User Rooms
wss user_rooms:{userId} Enterprise
A front-end connected as a user joins user_rooms:{userId} once per connection to keep the room list in sync. room_added names a room whose chat_room:{roomId} channel to join; room_removed names one to leave. Rooms the user was already in come from GET /api/v1/me/chats.
Where It Fits
- Connect to the WebSocket with your user credentials
- Join
user_rooms:{userId}to track your room memberships - Receive
room_addedwhen someone adds you to a room - Join
chat_room:{roomId}for each room to start receiving messages - Receive
room_removedwhen you’re taken out of a room
Join
Connect as the user, with a user JWT or a user API key (Authentication). {userId} must be the connected user’s own ID.
The channel also pushes room_title_changed and room_updated; ignore event names your client does not handle.
Events
room_added
When it fires: the user becomes a participant of a room, either because another user created the room with them in it or added them to an existing room.
Payload: Room.
What to do: add the room to the room list, join chat_room:{id} to render its messages, and join room_participants:{id} if the UI shows the roster.
Payload
Chat room UUID.
Room title.
Associated task UUID. Null if the room is not linked to a task.
Room creation timestamp.
Room last update timestamp.
room_removed
When it fires: the user is removed from a room, by another user or by room cleanup.
Payload: Room.
What to do: remove the room from the list, leave chat_room:{id} and room_participants:{id}, and discard local state for the room.
Payload
Chat room UUID.
Room title.
Associated task UUID. Null if the room is not linked to a task.
Room creation timestamp.
Room last update timestamp.