mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
Add explicit init to native messaging service (#1262)
This commit is contained in:
@@ -60,9 +60,11 @@ export function initFactory(
|
|||||||
notificationsService: NotificationsServiceAbstraction,
|
notificationsService: NotificationsServiceAbstraction,
|
||||||
platformUtilsService: PlatformUtilsServiceAbstraction,
|
platformUtilsService: PlatformUtilsServiceAbstraction,
|
||||||
stateService: StateServiceAbstraction,
|
stateService: StateServiceAbstraction,
|
||||||
cryptoService: CryptoServiceAbstraction
|
cryptoService: CryptoServiceAbstraction,
|
||||||
|
nativeMessagingService: NativeMessagingService
|
||||||
): Function {
|
): Function {
|
||||||
return async () => {
|
return async () => {
|
||||||
|
nativeMessagingService.init();
|
||||||
await stateService.init();
|
await stateService.init();
|
||||||
await environmentService.setUrlsFromStorage();
|
await environmentService.setUrlsFromStorage();
|
||||||
syncService.fullSync(true);
|
syncService.fullSync(true);
|
||||||
@@ -122,6 +124,7 @@ export function initFactory(
|
|||||||
PlatformUtilsServiceAbstraction,
|
PlatformUtilsServiceAbstraction,
|
||||||
StateServiceAbstraction,
|
StateServiceAbstraction,
|
||||||
CryptoServiceAbstraction,
|
CryptoServiceAbstraction,
|
||||||
|
NativeMessagingService,
|
||||||
],
|
],
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ export class NativeMessagingService {
|
|||||||
private messagingService: MessagingService,
|
private messagingService: MessagingService,
|
||||||
private vaultTimeoutService: VaultTimeoutService,
|
private vaultTimeoutService: VaultTimeoutService,
|
||||||
private stateService: StateService
|
private stateService: StateService
|
||||||
) {
|
) {}
|
||||||
|
|
||||||
|
init() {
|
||||||
ipcRenderer.on("nativeMessaging", async (_event: any, message: any) => {
|
ipcRenderer.on("nativeMessaging", async (_event: any, message: any) => {
|
||||||
this.messageHandler(message);
|
this.messageHandler(message);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user