diff --git a/src/enums/notificationType.ts b/src/enums/notificationType.ts index 2ceddadd5d..4b655404e7 100644 --- a/src/enums/notificationType.ts +++ b/src/enums/notificationType.ts @@ -11,4 +11,6 @@ export enum NotificationType { SyncFolderUpdate = 8, SyncCipherDelete = 9, SyncSettings = 10, + + LogOut = 11, } diff --git a/src/services/notifications.service.ts b/src/services/notifications.service.ts index 04be09e021..ff832c4136 100644 --- a/src/services/notifications.service.ts +++ b/src/services/notifications.service.ts @@ -27,7 +27,7 @@ export class NotificationsService implements NotificationsServiceAbstraction { constructor(private userService: UserService, private syncService: SyncService, private appIdService: AppIdService, private apiService: ApiService, - private cryptoService: CryptoService) { } + private cryptoService: CryptoService, private logoutCallback: () => Promise) { } async init(environmentService: EnvironmentService): Promise { this.inited = false; @@ -136,6 +136,9 @@ export class NotificationsService implements NotificationsServiceAbstraction { // Stop so a reconnect can be made await this.signalrConnection.stop(); break; + case NotificationType.LogOut: + this.logoutCallback(); + break; default: break; }