Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Why is synapse sending push notifications for read receipts? #10186

Closed
alariej opened this issue Jun 16, 2021 · 2 comments
Closed

Why is synapse sending push notifications for read receipts? #10186

alariej opened this issue Jun 16, 2021 · 2 comments

Comments

@alariej
Copy link

alariej commented Jun 16, 2021

Is there a reason why read receipts would generate push notifications? I can see this type of notification being sent to my push gateway by the matrix.org server, each time a read receipt is generated in a room:

{
  notification: {
    counts: { unread: 0 },
    devices: [{
      app_id: 'com.myapp.android',
      data: { format: 'event_id_only', lang: 'en' },
      pushkey: 'f46MmqaqTPCY...I3kUjCTBlXHt7iQ9Idf',
      pushkey_ts: 1623849036
    }],
    id: '',
    sender: '',
    type: null
  }
}

The notification is mostly empty and does not contain any event ID, room ID, sender or type.

I tried disabling push notifications completely (push rule .m.rule.master enabled and set with 'dont_notify'), the read receipt notifications still get pushed. I also tested on various clients: no difference observed.

I found this issue which might be related: element-hq/element-web#17263

Should read receipts really trigger push notifications?

@erikjohnston
Copy link
Member

Unfortunately yes, this is expected, as its used to reset the "badge counts" on the apps (i.e. the number on the app shortcut representing number of unread messages/rooms).

We could potentially add an option for clients to opt out of getting such pushes, but I'm not sure if anyone would use it.

@alariej
Copy link
Author

alariej commented Jun 22, 2021

I see. Thanks for the info. Perhaps a short note in the Matrix API documentation would be enough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants