You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user opens a channel -> we subscribe to real-time events for the channel.
User switches channel -> we unsubscribe to real-time events for the channel
Repeat
This is pretty expensive since the socketio server then makes a call to can_subscribe_doc every time we switch channels.
Instead, we should subscribe to a channel once and then not unsubscribe until either the user leaves the channel / the channel is deleted.
The only problem here is that if the user subscribes to a channel, they receive new messages in websocket events. If this user is then removed from the channel, we can't unsubscribe them from the websocket channel and they would still keep getting the new messages. Obviously this won't be shown on the UI, but might still be considered a risk?
The text was updated successfully, but these errors were encountered:
As of now:
This is pretty expensive since the socketio server then makes a call to
can_subscribe_doc
every time we switch channels.Instead, we should subscribe to a channel once and then not unsubscribe until either the user leaves the channel / the channel is deleted.
The only problem here is that if the user subscribes to a channel, they receive new messages in websocket events. If this user is then removed from the channel, we can't unsubscribe them from the websocket channel and they would still keep getting the new messages. Obviously this won't be shown on the UI, but might still be considered a risk?
The text was updated successfully, but these errors were encountered: