diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index fa7de5484d9..f62407eeafc 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -943,6 +943,7 @@ const safeProviders: SafeProvider[] = [ SignalRConnectionService, AuthServiceAbstraction, WebPushConnectionService, + ConfigService, ], }), safeProvider({ 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 c4e53692d7b..f7dce8f597e 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 @@ -184,16 +184,22 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer return; } - // Allow-list of notification types that are safe to process for non-active users - const multiUserNotificationTypes = new Set([NotificationType.AuthRequest]); + if ( + await firstValueFrom( + this.configService.getFeatureFlag$(FeatureFlag.InactiveUserServerNotification), + ) + ) { + // 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 activeAccountId = await firstValueFrom( + this.accountService.activeAccount$.pipe(map((a) => a?.id)), + ); - const isActiveUser = activeAccountId === userId; - if (!isActiveUser && !multiUserNotificationTypes.has(notification.type)) { - return; + const isActiveUser = activeAccountId === userId; + if (!isActiveUser && !multiUserNotificationTypes.has(notification.type)) { + return; + } } switch (notification.type) {