-
Notifications
You must be signed in to change notification settings - Fork 371
Description
Problem
When a user reads a message on one device (e.g. desktop/web), push notifications for that message remain visible on their other devices (e.g. mobile). There is currently no way to dismiss notifications cross-device using Stream's push notification system.
The push notification template configuration in the Stream Dashboard only supports the following event types:
message.newmessage.updatedreaction.newnotification.reminder_due
message.read is not available as a push event type, even though Stream's webhook system does fire message.read events. This means there is no built-in mechanism to send a silent/data-only push to a user's other devices when they read a message, which would allow those devices to clear the corresponding notifications.
Expected behaviour
Stream should support message.read (and ideally notification.mark_read) as push notification event types in the Dashboard configuration, with the ability to send them as silent/data-only pushes (APNs content-available: 1, FCM data-only message). This would allow mobile clients to:
- Receive a background push when the user reads a message on another device
- Cancel/dismiss the corresponding displayed notifications for that channel
- Provide a seamless multi-device experience consistent with apps like WhatsApp, Telegram, Slack, etc.
Use case
We have a React Native mobile app and an Electron desktop app both using Stream Chat. When a user receives a message:
- Mobile gets a push notification via
message.new→ displays a local notification - User opens the desktop app and reads the message →
channel.markRead()is called - Expected: notification on mobile disappears
- Actual: notification stays on mobile indefinitely until the user manually opens the mobile app
This is a standard expectation for any multi-device chat application.
Current workaround
We are building a custom webhook relay service that:
- Listens for
message.readevents via Stream's webhook - Looks up the user's registered FCM/APNs device tokens
- Sends a custom silent push (data-only) to the user's other devices
- The mobile app handles this in
setBackgroundMessageHandlerand callsnotifee.cancelDisplayedNotification()
This works but adds significant infrastructure overhead (device token registry, webhook service, Firebase Admin SDK integration) for what should be a first-class platform feature.
Proposed solution
Add message.read to the list of supported push notification event types in the Stream Dashboard, with:
- A default template that sends a silent/data-only push (no visible notification)
- The payload should include at minimum:
channel_cid,user.id, andread_attimestamp - On iOS:
content-available: 1withapns-push-type: backgroundand priority5 - On Android: data-only message (no
notificationkey) withpriority: high
This would allow SDK consumers to handle notification dismissal on the client side without needing custom backend infrastructure.
Environment
stream-chat-react-native: v5.x- Platform: iOS + Android (React Native)
- Also using:
stream-chat-json Electron desktop client - Push provider: Firebase Cloud Messaging (FCM) + APNs
Additional context
This is a common pain point — cross-device notification sync is a baseline expectation for modern chat apps. Other developers using Stream across multiple platforms (web + mobile, or iOS + Android) will encounter the same issue. Supporting message.read as a push event would significantly reduce the integration burden for multi-device deployments.