1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

PM-10564: Sync notification push type separation for notification updates

Sync notification push type is now used for both Notification create and update.
Renamed the event types to specifically mention the purpose of status for notification status updates.
This commit is contained in:
Maciej Zieniuk
2024-11-25 20:45:41 +00:00
parent 1285a7e994
commit fcf346985f
22 changed files with 221 additions and 184 deletions

View File

@ -37,7 +37,7 @@ public class CreateNotificationCommand : ICreateNotificationCommand
var newNotification = await _notificationRepository.CreateAsync(notification);
await _pushNotificationService.PushSyncNotificationCreateAsync(newNotification);
await _pushNotificationService.PushSyncNotificationAsync(newNotification);
return newNotification;
}

View File

@ -48,7 +48,7 @@ public class CreateNotificationStatusCommand : ICreateNotificationStatusCommand
var newNotificationStatus = await _notificationStatusRepository.CreateAsync(notificationStatus);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, newNotificationStatus);
await _pushNotificationService.PushSyncNotificationStatusAsync(notification, newNotificationStatus);
return newNotificationStatus;
}

View File

@ -65,7 +65,7 @@ public class MarkNotificationDeletedCommand : IMarkNotificationDeletedCommand
var newNotificationStatus = await _notificationStatusRepository.CreateAsync(notificationStatus);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, newNotificationStatus);
await _pushNotificationService.PushSyncNotificationStatusAsync(notification, newNotificationStatus);
}
else
{
@ -76,7 +76,7 @@ public class MarkNotificationDeletedCommand : IMarkNotificationDeletedCommand
await _notificationStatusRepository.UpdateAsync(notificationStatus);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, notificationStatus);
await _pushNotificationService.PushSyncNotificationStatusAsync(notification, notificationStatus);
}
}
}

View File

@ -65,7 +65,7 @@ public class MarkNotificationReadCommand : IMarkNotificationReadCommand
var newNotificationStatus = await _notificationStatusRepository.CreateAsync(notificationStatus);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, newNotificationStatus);
await _pushNotificationService.PushSyncNotificationStatusAsync(notification, newNotificationStatus);
}
else
{
@ -76,7 +76,7 @@ public class MarkNotificationReadCommand : IMarkNotificationReadCommand
await _notificationStatusRepository.UpdateAsync(notificationStatus);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, notificationStatus);
await _pushNotificationService.PushSyncNotificationStatusAsync(notification, notificationStatus);
}
}
}

View File

@ -48,6 +48,6 @@ public class UpdateNotificationCommand : IUpdateNotificationCommand
await _notificationRepository.ReplaceAsync(notification);
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, null);
await _pushNotificationService.PushSyncNotificationAsync(notification);
}
}