1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

[PM-20398] Add Notifications logging (#13640)

* Add Logging to know which notification transport is being used

* Remove debug log
This commit is contained in:
Justin Baur
2025-06-03 11:08:29 -04:00
committed by GitHub
parent 24ae013f71
commit 8a29df64d9

View File

@@ -108,14 +108,19 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract
return this.webPushConnectionService.supportStatus$(userId);
}),
supportSwitch({
supported: (service) =>
service.notifications$.pipe(
supported: (service) => {
this.logService.info("Using WebPush for notifications");
return service.notifications$.pipe(
catchError((err: unknown) => {
this.logService.warning("Issue with web push, falling back to SignalR", err);
return this.connectSignalR$(userId, notificationsUrl);
}),
),
notSupported: () => this.connectSignalR$(userId, notificationsUrl),
);
},
notSupported: () => {
this.logService.info("Using SignalR for notifications");
return this.connectSignalR$(userId, notificationsUrl);
},
}),
);
}