-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-10564] Push notification updates to other clients #5057
base: km/pm-10600
Are you sure you want to change the base?
Conversation
When a notification is updated, marked as read or deleted, a push notification is sent with updated push type event. The push notification includes the ReadDate and DeletedDate fields.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## km/pm-10600 #5057 +/- ##
===============================================
+ Coverage 43.30% 43.33% +0.02%
===============================================
Files 1412 1412
Lines 64887 64985 +98
Branches 5935 5944 +9
===============================================
+ Hits 28099 28159 +60
- Misses 35550 35588 +38
Partials 1238 1238 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
…nt type. Any update to the Notification from user perspective should be treated as update. That includes NotificationStatus, which when created would be displayed as update to the notification. Hence, push notification should be update type.
NotificationStatus not needed.
New Issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good.
I have one question around what should happen with individual notification status on a notification update. Should the notification statuses reset since the message is altered, or should they stay the same?
@@ -43,5 +47,7 @@ await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.Us | |||
notification.RevisionDate = DateTime.UtcNow; | |||
|
|||
await _notificationRepository.ReplaceAsync(notification); | |||
|
|||
await _pushNotificationService.PushSyncNotificationUpdateAsync(notification, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
Trying to understand how the client would receive this and determine what to do?
For example:
- A notification is made for the user
- The user reads the notification (updates notification status)
- The notification message is updated
- This push is triggered, sending back the notification with a null
ReadDate
andDeletedDate
- The client shows the notification as unread now from the push?
- Next time the client hits the API it will pick up the notification status as read?
More generally, do we need to determine between a notification update and a notification status update?
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-10564
📔 Objective
When a notification is updated, marked as read or deleted, a push notification is sent with updated push type event. The push notification includes the ReadDate and DeletedDate fields.
Notes
SyncNotification
toSyncNotificationCreate
push type event.SyncNotificationUpdate
push type event📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes