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:
@@ -29,5 +29,5 @@ export enum NotificationType {
|
||||
Notification = 20,
|
||||
NotificationStatus = 21,
|
||||
|
||||
PendingSecurityTasks = 22,
|
||||
RefreshSecurityTasks = 22,
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user