-
Notifications
You must be signed in to change notification settings - Fork 15
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
refactor: generate notification for new messages - WPB-11647 #2340
base: refactor/nse-pull-pending-events
Are you sure you want to change the base?
refactor: generate notification for new messages - WPB-11647 #2340
Conversation
… category, title, body)
…ilders, clean up code
…e-notification-new-messages
Datadog ReportBranch report: ✅ 0 Failed, 1510 Passed, 2 Skipped, 3m 10.43s Total Time |
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 8823f80. ♻️ This comment has been updated with latest results. |
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.
I've left a couple of comments as a first review
@@ -98,10 +93,6 @@ extension Assembly { | |||
self.pushChannel | |||
} | |||
|
|||
Injector.register(UpdateEventDecryptorProtocol.self) { |
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.
why is this remove from Assembly?
userInfo["selfUserIDString"] = context.selfUserID | ||
userInfo["senderIDString"] = context.senderID | ||
userInfo["conversationIDString"] = context.conversationID.uuid |
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.
is this going to be consumed to the main app? if so might be good to use constant for keys for safe access
Injector.register(ConversationLocalStoreProtocol.self) { | ||
self.conversationLocalStore | ||
} | ||
|
||
Injector.register(UserLocalStoreProtocol.self) { | ||
self.userLocalStore | ||
} | ||
|
||
Injector.register(MessageLocalStoreProtocol.self) { | ||
self.messageLocalStore | ||
} |
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.
don't we need to unregister the deps on teardown?
WPB-11647
Key points
This PR is about generating notification content related to new messages events specifically populating the right data in the notification (title, body, sound, category..) given the content of a message (a new message text, a reply, sharing a picture, an audio file, a video etc).
It introduces notification components such as NotificationCategory, NotificationTitle, NotificationBody, NotificationSound and dedicated builders to help generate the notification content.
Testing
Checklist
[WPB-XXX]
.