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

Wrong new messages count #8598

Closed
532910 opened this issue Oct 20, 2020 · 13 comments
Closed

Wrong new messages count #8598

532910 opened this issue Oct 20, 2020 · 13 comments
Labels
z-blocked (Deprecated Label)

Comments

@532910
Copy link

532910 commented Oct 20, 2020

Michael says this is synapse not a client ones
element-hq/element-web#15505
element-hq/element-android#2273

Nope, the count is calculated by the server; notification_count https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-sync

Originally posted by @t3chguy in element-hq/element-web#15505 (comment)

It looks like missed calls are counted multiple times:
Web:
image
image

Android:
image
image

With Show hidden events there 5 events:
image

Synapse 1.20.1 on debian stable

@anoadragon453
Copy link
Member

In an encrypted room, the server is unable to tell whether an event is a call, a message, or otherwise, hence we get this behaviour.

Do you experience this problem in unencrypted rooms as well?

@anoadragon453
Copy link
Member

# XXX: this is going to fire for events which aren't m.room.messages
# but are encrypted (e.g. m.call.*)...
{
"rule_id": "global/underride/.m.rule.encrypted_room_one_to_one",
"conditions": [
{"kind": "room_member_count", "is": "2", "_id": "member_count"},
{
"kind": "event_match",
"key": "type",
"pattern": "m.room.encrypted",
"_id": "_encrypted",
},
],
"actions": [
"notify",
{"set_tweak": "sound", "value": "default"},
{"set_tweak": "highlight", "value": False},
],
},

@t3chguy
Copy link
Member

t3chguy commented Oct 20, 2020

So this is probably a compound issue which should be resolved by the FTUE Notifications project which has a workaround for the server's over-count

@532910
Copy link
Author

532910 commented Oct 21, 2020

Yep, this is an encrypted room. For unencrypted it shows correct one event for a missed call.

@anoadragon453
Copy link
Member

Guessing this is blocked by the notifications project then. Follow matrix-org/matrix-spec-proposals#2785 for updates.

@ajax313
Copy link

ajax313 commented Feb 12, 2022

in android when you take missed call the event was 3 missed call.

@erikjohnston
Copy link
Member

I don't think there is anything we on the Synapse team can do here. This behaviour is not ideal, but needs spec work to fix properly.

@532910
Copy link
Author

532910 commented Feb 23, 2022

Element team says this is on the synapse side, Synapse team says behaviour is not ideal. Awesome!

@erikjohnston
Copy link
Member

To be clear: both teams are saying that this requires changes to the spec. That work can be tracked at e.g. matrix-org/matrix-spec-proposals#2785. Once any relevant MSC has changed then the Synapse team will do the work to implement it.

Having issues open across lots of different repos makes it much harder to track these issues, and make it way more likely for the work to be forgotten.

@ArneNostitz
Copy link

I am experiencing the wrong count in all my rooms. The notification is off by 5. Opening and closing the app (element) corrects it though. Element iOS told me this is a server issue. So I found this. Is this the same issue?

@clokep
Copy link
Member

clokep commented Dec 2, 2022

I am experiencing the wrong count in all my rooms. The notification is off by 5. Opening and closing the app (element) corrects it though. Element iOS told me this is a server issue. So I found this. Is this the same issue?

Can you cross-link the issue with Element iOS?

@ArneNostitz
Copy link

i posted first about the issue here element-hq/element-ios#6829.

on mac i dont see this issue - also reading on Mac adjusts the notification count on iOS ... so its working correctly in the background sending the read receipt through ... but the iOS count is still 5 off .... i still think this is an iOS issue ...

@ArneNostitz
Copy link

I opened a new issue with a detailed image of what is happening element-hq/element-ios#7135

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-blocked (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

7 participants