mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-10611] End user notification sync (#14116)
* [PM-10611] Remove Angular dependencies from Notifications module * [PM-10611] Move end user notification service to /libs/common/vault/notifications * [PM-10611] Implement listenForEndUserNotifications() for EndUserNotificationService * [PM-10611] Add missing taskId to notification models * [PM-10611] Add switch cases for end user notification payloads * [PM-10611] Mark task related notifications as read when visiting the at-risk password page * [PM-10611] Revert change to default-notifications service * [PM-10611] Fix test * [PM-10611] Fix tests and log warning in case more notifications than the default page size are available * [PM-10611] Use separate feature flag for end user notifications * [PM-10611] Fix test
This commit is contained in:
@@ -191,6 +191,10 @@ import { InternalFolderService as InternalFolderServiceAbstraction } from "@bitw
|
||||
import { TotpService as TotpServiceAbstraction } from "@bitwarden/common/vault/abstractions/totp.service";
|
||||
import { VaultSettingsService as VaultSettingsServiceAbstraction } from "@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import {
|
||||
DefaultEndUserNotificationService,
|
||||
EndUserNotificationService,
|
||||
} from "@bitwarden/common/vault/notifications";
|
||||
import {
|
||||
CipherAuthorizationService,
|
||||
DefaultCipherAuthorizationService,
|
||||
@@ -402,6 +406,7 @@ export default class MainBackground {
|
||||
sdkService: SdkService;
|
||||
sdkLoadService: SdkLoadService;
|
||||
cipherAuthorizationService: CipherAuthorizationService;
|
||||
endUserNotificationService: EndUserNotificationService;
|
||||
inlineMenuFieldQualificationService: InlineMenuFieldQualificationService;
|
||||
taskService: TaskService;
|
||||
|
||||
@@ -1320,6 +1325,14 @@ export default class MainBackground {
|
||||
|
||||
this.ipcContentScriptManagerService = new IpcContentScriptManagerService(this.configService);
|
||||
this.ipcService = new IpcBackgroundService(this.logService);
|
||||
|
||||
this.endUserNotificationService = new DefaultEndUserNotificationService(
|
||||
this.stateProvider,
|
||||
this.apiService,
|
||||
this.notificationsService,
|
||||
this.authService,
|
||||
this.logService,
|
||||
);
|
||||
}
|
||||
|
||||
async bootstrap() {
|
||||
@@ -1406,6 +1419,9 @@ export default class MainBackground {
|
||||
this.taskService.listenForTaskNotifications();
|
||||
}
|
||||
|
||||
if (await this.configService.getFeatureFlag(FeatureFlag.EndUserNotifications)) {
|
||||
this.endUserNotificationService.listenForEndUserNotifications();
|
||||
}
|
||||
resolve();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user