Skip to content

feat(notifications): rich contact-chat notifications with name resolution fallback#825

Merged
bmc08gt merged 1 commit into
code/cashfrom
feat/chat-notifications
Jun 2, 2026
Merged

feat(notifications): rich contact-chat notifications with name resolution fallback#825
bmc08gt merged 1 commit into
code/cashfrom
feat/chat-notifications

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

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.

…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>
@bmc08gt bmc08gt self-assigned this Jun 2, 2026
@github-actions github-actions Bot added area: ui Compose UI, theme, components, resources area: network gRPC, connectivity, API, exchange rates area: notifications Push notifications, in-app messaging type: feature New functionality labels Jun 2, 2026
@bmc08gt bmc08gt merged commit ade143b into code/cash Jun 2, 2026
3 checks passed
@bmc08gt bmc08gt deleted the feat/chat-notifications branch June 2, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates area: notifications Push notifications, in-app messaging area: ui Compose UI, theme, components, resources type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant