Skip to content

feat: reply to chat messages straight from the notification#75

Open
GSTJ wants to merge 2 commits into
mainfrom
GSTJ/chat-notifications
Open

feat: reply to chat messages straight from the notification#75
GSTJ wants to merge 2 commits into
mainfrom
GSTJ/chat-notifications

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Chat pushes now have a Reply action you can answer without opening the app, and they land on their own "Messages" channel on Android.

Details

  • Dedicated Android notification channel for chat messages, with a localized name (en / pt-BR). The server now tags chat pushes with it.
  • Notification category with a text-input Reply action on both platforms, localized ("Reply" / "Responder"). The server tags chat pushes with the matching categoryId (the real expo-server-sdk field name, the docs' categoryIdentifier doesn't exist on the type).
  • The reply goes through the same tRPC send-message mutation the chat screen uses, handled by the root-level notification listener, so it works with no chat screen mounted. The swipe screen's separate listener now skips reply responses so nothing double-fires.
  • Known expo-notifications limit: replying from a killed app briefly foregrounds the app to deliver the event. Foreground and background replies don't need that.
  • Tapping the notification body already deep-linked to the right conversation; verified and left untouched.
  • JS-only change, no version bump, so this one can ship over the air.

Testing steps

Needs a real device and a fresh install (Android only registers the new channel on first launch; on a device with an older build, reinstall first).

  1. From a second test account, send yourself a chat message with the app in the background.
  2. Expand the notification: there should be a Reply button. Type an answer and send it right there. The other account receives it and your phone stays where it was, no chat screen popping up.
  3. Force-close the app and reply from the notification again: the app will open briefly (expected), and the message still goes out.
  4. Tap the body of a chat notification: the app opens that exact conversation.
  5. Android: long-press the notification or check the app's notification settings, chat messages now appear under their own "Messages" category, separate from the rest.

Chat-message pushes now use a dedicated Android "messages" channel and
carry a "Reply" text-input action on both platforms, so the user can
answer without opening the app. The reply is sent through the existing
message.send tRPC mutation from a root-level listener so it works
whether the app is foregrounded or backgrounded. Tapping the
notification body still deep-links into the right conversation
(existing behavior, verified working, left untouched).

Server sets channelId/categoryId on the push payload; no native config
changed, so no version bump.
… dog's photo (#80)

* feat(mobile): render chat pushes as iOS communication notifications

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).

* chore: dedupe lockfile
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