From 2dc77b6143f59d45fef762a64c353db14d12bb1d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 23 Aug 2018 09:25:39 -0400 Subject: [PATCH] disable notifications server url with https://- --- src/services/notifications.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/services/notifications.service.ts b/src/services/notifications.service.ts index 5071b94ccd7..3c395904b43 100644 --- a/src/services/notifications.service.ts +++ b/src/services/notifications.service.ts @@ -37,6 +37,12 @@ export class NotificationsService implements NotificationsServiceAbstraction { this.url = environmentService.baseUrl + '/notifications'; } + // Set notifications server URL to `https://-` to effectively disable communication + // with the notifications server from the client app + if (this.url === 'https://-') { + return; + } + if (this.signalrConnection != null) { this.signalrConnection.off('ReceiveMessage'); await this.signalrConnection.stop(); @@ -64,6 +70,9 @@ export class NotificationsService implements NotificationsServiceAbstraction { } async updateConnection(sync = false): Promise { + if (!this.inited) { + return; + } try { if (await this.isAuthedAndUnlocked()) { await this.reconnect(sync);