From ce5a16f6869372a0f80543e1b9001e59def6f5aa Mon Sep 17 00:00:00 2001 From: Patrick Pimentel Date: Fri, 29 Aug 2025 15:29:05 -0400 Subject: [PATCH] fix(extension-device-approval): [PM-14943] Answering Service Full Implementation - Added Justin's change and things seem to be working better. Still broken on new account. --- .../default-server-notifications.service.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 7b76001198b..a775fda069a 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 @@ -69,6 +69,9 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer this.notifications$ = this.configService .getFeatureFlag$(FeatureFlag.InactiveUserServerNotification) .pipe( + tap((value) => { + console.debug(`[DefaultServerNotificationsService] feature flag value for inactive user server notifications: ${value}`); + }), distinctUntilChanged(), switchMap((inactiveUserServerNotificationEnabled) => { if (inactiveUserServerNotificationEnabled) { @@ -76,6 +79,9 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer return this.accountService.accounts$.pipe( map((accounts) => Object.keys(accounts) as UserId[]), distinctUntilChanged(), + tap((value) => { + console.debug(`[DefaultServerNotificationsService] new accounts: ${value}`); + }), switchMap((userIds) => { if (userIds.length === 0) { return EMPTY; @@ -119,7 +125,13 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer private userNotifications$(userId: UserId) { return this.environmentService.getEnvironment$(userId).pipe( map((env) => env.getNotificationsUrl()), + tap((value) => { + console.debug(`[DefaultServerNotificationsService] userNotifications$ before: ${value}`); + }), distinctUntilChanged(), + tap((value) => { + console.debug(`[DefaultServerNotificationsService] userNotifications$ after: ${value}`); + }), switchMap((notificationsUrl) => { if (notificationsUrl === DISABLED_NOTIFICATIONS_URL) { console.debug( @@ -135,6 +147,7 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer private userNotificationsHelper$(userId: UserId, notificationsUrl: string) { return this.hasAccessToken$(userId).pipe( + distinctUntilChanged(), switchMap((hasAccessToken) => { if (!hasAccessToken) { console.debug(