mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
FIX: Correctly update _subscribedTo* props (#20351)
`_subscribedToChat` was previously a never-true, and `_subscribedToCore` once set to false could no longer be flicked back to true.
This commit is contained in:
@ -117,6 +117,7 @@ export default class ChatNotificationManager extends Service {
|
|||||||
|
|
||||||
if (!this._subscribedToChat) {
|
if (!this._subscribedToChat) {
|
||||||
this.messageBus.subscribe(this._chatAlertChannel(), this.onMessage);
|
this.messageBus.subscribe(this._chatAlertChannel(), this.onMessage);
|
||||||
|
this.set("_subscribedToChat", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.only && this._subscribedToCore) {
|
if (opts.only && this._subscribedToCore) {
|
||||||
@ -131,6 +132,7 @@ export default class ChatNotificationManager extends Service {
|
|||||||
}
|
}
|
||||||
if (!this._subscribedToCore) {
|
if (!this._subscribedToCore) {
|
||||||
this.messageBus.subscribe(this._coreAlertChannel(), this.onMessage);
|
this.messageBus.subscribe(this._coreAlertChannel(), this.onMessage);
|
||||||
|
this.set("_subscribedToCore", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.only && this._subscribedToChat) {
|
if (opts.only && this._subscribedToChat) {
|
||||||
|
Reference in New Issue
Block a user