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:
Jarek Radosz 2023-02-17 21:45:21 +01:00 committed by GitHub
parent 052029b09b
commit 9519747a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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) {