mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +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:
@@ -108,14 +108,19 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract
|
|||||||
return this.webPushConnectionService.supportStatus$(userId);
|
return this.webPushConnectionService.supportStatus$(userId);
|
||||||
}),
|
}),
|
||||||
supportSwitch({
|
supportSwitch({
|
||||||
supported: (service) =>
|
supported: (service) => {
|
||||||
service.notifications$.pipe(
|
this.logService.info("Using WebPush for notifications");
|
||||||
|
return service.notifications$.pipe(
|
||||||
catchError((err: unknown) => {
|
catchError((err: unknown) => {
|
||||||
this.logService.warning("Issue with web push, falling back to SignalR", err);
|
this.logService.warning("Issue with web push, falling back to SignalR", err);
|
||||||
return this.connectSignalR$(userId, notificationsUrl);
|
return this.connectSignalR$(userId, notificationsUrl);
|
||||||
}),
|
}),
|
||||||
),
|
);
|
||||||
notSupported: () => this.connectSignalR$(userId, notificationsUrl),
|
},
|
||||||
|
notSupported: () => {
|
||||||
|
this.logService.info("Using SignalR for notifications");
|
||||||
|
return this.connectSignalR$(userId, notificationsUrl);
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user