mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
FIX: in some cases we subscribed to an invalid channel
in some very rare cases we would publish and empty payload causing messagebus corruption this broke all navigation
This commit is contained in:
@ -80,6 +80,9 @@ export default Ember.Component.extend({
|
||||
if (this.get('isDestroyed')) { return; }
|
||||
this.set('presenceUsers', r.users);
|
||||
this.set('channel', r.messagebus_channel);
|
||||
|
||||
if (!r.messagebus_channel) { return; }
|
||||
|
||||
this.messageBus.subscribe(r.messagebus_channel, message => {
|
||||
if (!this.get('isDestroyed')) this.set('presenceUsers', message.users);
|
||||
this._clearTimer = Ember.run.debounce(this, 'clear', keepAliveDuration + bufferTime);
|
||||
|
Reference in New Issue
Block a user