Skip to content

Support message.read as a push notification event for cross-device notification dismissal #3497

@haisamMH

Description

@haisamMH

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.new
  • message.updated
  • reaction.new
  • notification.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:

  1. Receive a background push when the user reads a message on another device
  2. Cancel/dismiss the corresponding displayed notifications for that channel
  3. 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:

  1. Mobile gets a push notification via message.new → displays a local notification
  2. User opens the desktop app and reads the message → channel.markRead() is called
  3. Expected: notification on mobile disappears
  4. 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:

  1. Listens for message.read events via Stream's webhook
  2. Looks up the user's registered FCM/APNs device tokens
  3. Sends a custom silent push (data-only) to the user's other devices
  4. The mobile app handles this in setBackgroundMessageHandler and calls notifee.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, and read_at timestamp
  • On iOS: content-available: 1 with apns-push-type: background and priority 5
  • On Android: data-only message (no notification key) with priority: 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-js on 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions