1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

added Send sync notification support (#250)

This commit is contained in:
Addison Beck
2021-01-22 16:52:08 -05:00
committed by GitHub
parent 6ac6df75d7
commit 68bd93e45b
5 changed files with 64 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ import {
NotificationResponse,
SyncCipherNotification,
SyncFolderNotification,
SyncSendNotification,
} from '../models/response/notificationResponse';
export class NotificationsService implements NotificationsServiceAbstraction {
@@ -159,6 +160,13 @@ export class NotificationsService implements NotificationsServiceAbstraction {
this.logoutCallback();
}
break;
case NotificationType.SyncSendCreate:
case NotificationType.SyncSendUpdate:
await this.syncService.syncUpsertSend(notification.payload as SyncSendNotification,
notification.type === NotificationType.SyncSendUpdate);
break;
case NotificationType.SyncSendDelete:
await this.syncService.syncDeleteSend(notification.payload as SyncSendNotification);
default:
break;
}