Add NotificationType.SyncOrganizations (#7924)

This commit is contained in:
Thomas Rittson 2024-02-14 04:15:52 +10:00 committed by GitHub
parent 6f9e6a9fec
commit c8b04729cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View File

@ -20,4 +20,6 @@ export enum NotificationType {
AuthRequest = 15,
AuthRequestResponse = 16,
SyncOrganizations = 17,
}

View File

@ -27,6 +27,7 @@ export class NotificationResponse extends BaseResponse {
break;
case NotificationType.SyncVault:
case NotificationType.SyncCiphers:
case NotificationType.SyncOrganizations:
case NotificationType.SyncOrgKeys:
case NotificationType.SyncSettings:
case NotificationType.LogOut:

View File

@ -167,6 +167,12 @@ export class NotificationsService implements NotificationsServiceAbstraction {
await this.syncService.fullSync(false);
}
break;
case NotificationType.SyncOrganizations:
if (isAuthenticated) {
// An organization update may not have bumped the user's account revision date, so force a sync
await this.syncService.fullSync(true);
}
break;
case NotificationType.SyncOrgKeys:
if (isAuthenticated) {
await this.syncService.fullSync(true);