From 7d853aa5c9036c599b74a392d8980778bf6ec268 Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Thu, 28 Aug 2025 15:34:28 -0400 Subject: [PATCH] fix(extension-device-approval): [PM-14943] Answering Service Full Implementation - Minor changes to default server notifications service. --- .../default-server-notifications.service.ts | 35 ++----------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/libs/common/src/platform/server-notifications/internal/default-server-notifications.service.ts b/libs/common/src/platform/server-notifications/internal/default-server-notifications.service.ts index 5570ea396d3..79a22cfe017 100644 --- a/libs/common/src/platform/server-notifications/internal/default-server-notifications.service.ts +++ b/libs/common/src/platform/server-notifications/internal/default-server-notifications.service.ts @@ -165,24 +165,9 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer } private hasAccessToken$(userId: UserId) { - return this.configService.getFeatureFlag$(FeatureFlag.PushNotificationsWhenLocked).pipe( - switchMap((featureFlagEnabled) => { - if (featureFlagEnabled) { - return this.authService.authStatusFor$(userId).pipe( - map( - (authStatus) => - authStatus === AuthenticationStatus.Locked || - authStatus === AuthenticationStatus.Unlocked, - ), - distinctUntilChanged(), - ); - } else { - return this.authService.authStatusFor$(userId).pipe( - map((authStatus) => authStatus === AuthenticationStatus.Unlocked), - distinctUntilChanged(), - ); - } - }), + return this.authService.authStatusFor$(userId).pipe( + map((authStatus) => authStatus === AuthenticationStatus.Unlocked), + distinctUntilChanged(), ); } @@ -215,20 +200,6 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer } } - // Allow-list of notification types that are safe to process for non-active users - const multiUserNotificationTypes = new Set([ - NotificationType.AuthRequest, - ]); - - const activeAccountId = await firstValueFrom( - this.accountService.activeAccount$.pipe(map((a) => a?.id)), - ); - - const isActiveUser = activeAccountId === userId; - if (!isActiveUser && !multiUserNotificationTypes.has(notification.type)) { - return; - } - switch (notification.type) { case NotificationType.SyncCipherCreate: case NotificationType.SyncCipherUpdate: