Skip to content

Mappings between userId and roomId are not reliably removed

It is expected that a user is only in a single room at a time. If a user joins an additional room in another tab, the mappings are overridden. If the user then unsubscribes or disconnects from the previously joined room, the corresponding mapping does no longer exist. As a consequence, the user count for the previously joined room keeps including the user forever or until they resubscribe and unsubscribe.

Proposal

The issue could be fixed without refactoring by removing the user from other rooms before adding them to the new room. In this case, the user would only be counted for the last room they joined. If it is required, to keep the mapping for all rooms the user is subscribed to, the handling of mappings need to be refactored to fix this issue.

Edited by Daniel Gerhardt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information