Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

definition of "unread count" in push gateway API does not match reality #644

Open
richvdh opened this issue Jun 11, 2020 · 8 comments
Open
Labels
A-Push clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@richvdh
Copy link
Member

richvdh commented Jun 11, 2020

The _matrix/push/v1/notify endpoint includes a parameter notification.counts.unread, defined as "The number of unread messages a user has across all of the rooms they are a member of."

Since matrix-org/synapse#793, Synapse has chosen to interpret this as "the number of rooms with unread messages".

Possibly the spec should be reworded to allow discretion on the part of the homeserver impl?

@turt2live turt2live added clarification An area where the expected behaviour is understood, but the spec could do with being more explicit A-Push labels Jun 11, 2020
@richvdh
Copy link
Member Author

richvdh commented Jun 18, 2020

according to @BillCarsonFr , the riot mobile clients don't even use this field any more. maybe we can just drop it?

@richvdh
Copy link
Member Author

richvdh commented Jun 18, 2020

while we're here: the spec also has notification.counts.missed_calls, which is fairly handwavily defined, and afaict has never been implemented by synapse

@richvdh
Copy link
Member Author

richvdh commented Jun 18, 2020

but according to @ismailgulek, riot-iOS does use this field.

@ismailgulek
Copy link

but according to @ismailgulek, riot-iOS does use this field.

Yes, i confirm Riot-iOS will need notification.counts.unread in the next App Store version, but not notification.counts.missed_calls

@richvdh
Copy link
Member Author

richvdh commented Jun 18, 2020

but according to @ismailgulek, riot-iOS does use this field.

but we could still consider getting rid of notification.counts.missed_calls, which is unimplemented.

@richvdh
Copy link
Member Author

richvdh commented Aug 18, 2020

it's now clear that element-iOS does use notification.counts.unread, whereas element-android does not. it seems like we should add a way for clients to opt in or out of receiving this field. If they have no purpose for it, there is no benefit of the HS and pushgw spending CPU cycles sending pushes, and the clients spending battery receiving them, only for them to be ignored.

@callahad
Copy link
Contributor

callahad commented Jun 3, 2021

Note that as of matrix-org/synapse#8820 in Synapse 1.24, it's possible (but not the default) to configure Synapse to meet the Spec's original definition of "The number of unread messages a user has across all of the rooms they are a member of."

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@ara4n
Copy link
Member

ara4n commented Nov 11, 2023

this just caused much confusion with the EX team (cc @stefanceriu). EX is unilaterally getting a remotely-calculated badge count from sygnal, which then fights against the locally calculated badge count, and chaos happens: element-hq/element-x-ios#2066. So:

a) the spec should be fixed to describe what the count actually means
b) clients need a way to opt out of it being set on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Push clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

5 participants