-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk): Don't subscribe to already subscribed rooms.
When subscribing to an already subscribed room, the subscription state was reset, the subscription was resent by cancelling the in-flight request. All this is useless and can create a feeling of lag. This patch checks if a room is subscribed first. If it is, nothing happens. If it is not, the room subscription is created, and the in-flight request is cancelled. Tests are updated to reflect this new change. Note: room subscription settings are not taken into account in this “presence” pattern. It means that if we subscribe to an already subscribed room but with different settings, nothing will happen. The server will ignore the new settings anywhere for the moment.
- Loading branch information
Showing
2 changed files
with
95 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters