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

Refactor PendingSecurityTasks to RefreshSecurityTasks (#15021)

- Allows for more general use case of security task notifications
This commit is contained in:
Nick Krantz
2025-07-07 09:26:34 -05:00
committed by GitHub
parent 2e03b8cbac
commit b54c40ff00
3 changed files with 4 additions and 4 deletions

View File

@@ -29,5 +29,5 @@ export enum NotificationType {
Notification = 20,
NotificationStatus = 21,
PendingSecurityTasks = 22,
RefreshSecurityTasks = 22,
}

View File

@@ -365,7 +365,7 @@ describe("Default task service", () => {
const subscription = service.listenForTaskNotifications();
const notification = {
type: NotificationType.PendingSecurityTasks,
type: NotificationType.RefreshSecurityTasks,
} as NotificationResponse;
mockNotifications$.next([notification, userId]);
@@ -390,7 +390,7 @@ describe("Default task service", () => {
const subscription = service.listenForTaskNotifications();
const notification = {
type: NotificationType.PendingSecurityTasks,
type: NotificationType.RefreshSecurityTasks,
} as NotificationResponse;
mockNotifications$.next([notification, "other-user-id" as UserId]);

View File

@@ -152,7 +152,7 @@ export class DefaultTaskService implements TaskService {
return this.notificationService.notifications$.pipe(
filter(
([notification, userId]) =>
notification.type === NotificationType.PendingSecurityTasks &&
notification.type === NotificationType.RefreshSecurityTasks &&
filterByUserIds.includes(userId),
),
map(([, userId]) => userId),