"joined" events don't always get emitted
In order for the frontend to display the multi-user chat's user list, it must receive the list of users from a {"op": "joined"}
event. Typically, the backend sends this data in response to an {"op": "joinChat"}
event. However, it does not respond with that if the chat was already joined, according to id_to_joined
. (This happens for chats in non-deferred services, for example the sapphire
XMPP chat.) So as a solution, the {"op": "joined"}
event should always be sent in response to joinChat
, even if nothing actually changed on the backend.
(Aside: I noticed the {"op": "joined"}
event can also be emitted by a buddy joining, and then it sends just the new user, not the full updated user list... do we have a corresponding event {"op": "left"}
event, for when users leave the chat?)