feat(notifications): rich contact-chat notifications with name resolution fallback#825
Merged
Merged
Conversation
…tion fallback Upgrade notification service to support MessagingStyle for contact chat conversations with sender photos, grouped messaging, and proper person attribution. Refactor Substitution from a data class to a sealed interface to model substitution variants type-safely, and fix ProtobufToLocal to use mapNotNull so unknown substitution kinds are dropped instead of mapped to null fields. Add ContactResolver (DB → device PhoneLookup → formatted number → raw e164 fallback chain) and DeviceContactLookup interface in shared:contacts, replacing inline resolution in NotificationService. The PhoneLookup fallback eliminates the race where slow contact sync caused raw phone numbers in CONTACT_JOIN notifications. The sync call is now fire-and-forget so it no longer blocks notification posting. Also adds ContactDao.getPhotoUri/ContactDataSource.getPhotoUri for contact photo resolution, updates notification color, and removes unused Title.localized and ofKin suffix from LocalizedText. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade notification service to support MessagingStyle for contact chat conversations with sender photos, grouped messaging, and proper person attribution.
Refactor Substitution from a data class to a sealed interface to model substitution variants type-safely, and fix ProtobufToLocal to use mapNotNull so unknown substitution kinds are dropped instead of mapped to null fields.
Add ContactResolver (DB → device PhoneLookup → formatted number → raw e164 fallback chain) and DeviceContactLookup interface in shared:contacts, replacing inline resolution in NotificationService. The PhoneLookup fallback eliminates the race where slow contact sync caused raw phone numbers in CONTACT_JOIN notifications. The sync call is now fire-and-forget so it no longer blocks notification posting.
Also adds ContactDao.getPhotoUri/ContactDataSource.getPhotoUri for contact photo resolution, updates notification color, and removes unused Title.localized and ofKin suffix from LocalizedText.