mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Refactor PendingSecurityTasks to RefreshSecurityTasks (#15021)
- Allows for more general use case of security task notifications
This commit is contained in:
@@ -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