Skip to content

feat(mobile): chat pushes as iOS communication notifications with the dog's photo#80

Merged
GSTJ merged 2 commits into
GSTJ/chat-notificationsfrom
GSTJ/comm-notifications
Jul 22, 2026
Merged

feat(mobile): chat pushes as iOS communication notifications with the dog's photo#80
GSTJ merged 2 commits into
GSTJ/chat-notificationsfrom
GSTJ/comm-notifications

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Chat pushes on iOS now render iMessage-style, with the sender dog's photo and name, and group per conversation.

Stacked on #75 (base branch is the reply-action one; merge that first).

Details

  • Real Swift Notification Service Extension (via @bacons/apple-targets): intercepts the chat push, downloads the sender's avatar, donates the messaging intent and re-renders the notification as a communication notification.
  • Fallback contract respected everywhere: missing fields, failed avatar download, intent errors or the extension time budget expiring all deliver the original notification untouched. A broken extension can never eat a message.
  • Notifications group per conversation via the match id thread.
  • Server now sends mutableContent, senderName and senderAvatarUrl on chat pushes, using only the first APPROVED photo (which also stops unapproved sender images from leaking in that payload).
  • Communication entitlement wired on both the app and the extension.
  • Release heads-up: the entitlement must be enabled on the provisioning profile in the Apple Developer portal before device/store builds sign.

Testing steps

Needs a build with real push credentials (won't show in simulator).

  1. From a second test account with a dog photo, send yourself a chat message with the app closed or in background.
  2. The notification should show the sender dog's round photo and name, looking like an iMessage/WhatsApp notification instead of a plain one.
  3. Send several messages from two different matches: notifications should stack grouped by conversation.
  4. Reply from the notification (feature from the base PR): should still work exactly as before.
  5. Remove the sender dog's photos (or use a dog with no approved photo) and send again: the notification should still arrive, just without the avatar.

GSTJ added 2 commits July 8, 2026 15:33
Notification Service Extension (Swift, via @bacons/apple-targets) that
intercepts chat pushes, downloads the sender dog's avatar and donates an
INSendMessageIntent so iOS styles them like iMessage/WhatsApp messages.

- server marks chat pushes mutable-content and ships senderName +
  senderAvatarUrl (first approved photo) in the data payload
- communication entitlement wired on both the app and the extension
- NSE always falls back to the untouched notification on any failure
  (missing fields, avatar download, intent donation)

Stacks on GSTJ/chat-notifications (reply action + messages channel).
@GSTJ
GSTJ merged commit b5119be into GSTJ/chat-notifications Jul 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant