mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: correctly resubscribe after restart (#21891)
Few weeks ago we implemented `onPresenceChangeCallback` to re-sync chat channels state when going back to a long time inactive tab. This codepath however contained a bug as we were reseting all subscriptions but only restarting global subscriptions and not per channel subscriptions. This commit should correctly ensure we correctly do so. It's sadly very hard to test time related changes in system specs. Co-authored-by: Martin Brennan <mjrbrennan@gmail.com>
This commit is contained in:
parent
1d9f195207
commit
676b558265
@ -57,6 +57,10 @@ export default class ChatSubscriptionsManager extends Service {
|
||||
restartChannelsSubscriptions(messageBusIds) {
|
||||
this.stopChannelsSubscriptions();
|
||||
this.startChannelsSubscriptions(messageBusIds);
|
||||
|
||||
(this.chatChannelsManager.channels || []).forEach((channel) => {
|
||||
this.startChannelSubscription(channel);
|
||||
});
|
||||
}
|
||||
|
||||
startChannelsSubscriptions(messageBusIds) {
|
||||
|
Loading…
Reference in New Issue
Block a user