Implement real-time WebSocket gateway for presence, DM, and world chat (US-4, US-2)
This commit is contained in:
@@ -109,6 +109,11 @@ class PresenceStore:
|
||||
client = await self._ensure_client()
|
||||
await client.set(self._heartbeat_key(user_id), "1", ex=self._heartbeat_ttl)
|
||||
|
||||
async def clear_heartbeat(self, user_id: int) -> None:
|
||||
"""Clear heartbeat for *user_id* to mark them offline immediately."""
|
||||
client = await self._ensure_client()
|
||||
await client.delete(self._heartbeat_key(user_id))
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Online checks
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user