-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Room marked as unread when I was the last person to speak #14837
Comments
I'll need to double check, but I don't think Synapse has any code to mark things as read when a new event comes in. (There's no implicit receipt created in this case.) I thought I saw code in Element Web somewhere that ignored unread counts if you had sent the last event in the room? |
I did some testing and this seems to be working as expected. I did something like:
From what I can tell in the spec this is expected behavior and clients should be sending a read receipt.
@gsouquet can you expand on why you think this shouldn't be possible? |
There is some logic in the client that says that if you're the last person who sent a message to a room, it is implied that you've read the entire conversation up until that point. Maybe something has regressed in Element after all, 🤔 |
Can you link? Is this the logic that broke? |
Me and Andy looked into that, and it seems that this line is called in Element Web when loading from the cache. |
I don't see anything in the code which connects event sending and clearing notifications, but I could be missing it! |
I'm a little suspicious that is related since it doesn't seem to do any checks against the current user? I think what it is doing is saying:
We know that Alice must have read at least up-to event E since she sent it? I might be misunderstanding what that code is attempting to do, but that's what the comments around it imply. |
It seems that the spec, however, does say we should be doing this. See matrix-org/matrix-spec#1410, which quotes the spec:
I still don't think that Synapse has ever done this though? |
The code is on the receiving side ftr, if we see an event from a user we generate a synthetic receipt for them |
Description
I have a room on matrix.org where the sync response shows me as the last person to send an event, but also has
notification_count: 1
. @gsouquet tells me that should never happen: if I sent the last event, the room should not be unread.The room ID is
!KCcFbqJHMQscdVsFTa:element.io
The URL I used to sync was:
https://matrix-client.matrix.org/_matrix/client/r0/sync?filter=%7B%22room%22%3A%7B%22timeline%22%3A%7B%22unread_thread_notifications%22%3Atrue%2C%22limit%22%3A20%7D%2C%22state%22%3A%7B%22lazy_load_members%22%3Atrue%7D%7D%7D&timeout=0&_cacheBuster=1673621386081
My username is
@andybalaam:matrix.org
The full sync response for this room is:
Steps to reproduce
.
Homeserver
matrix.org
Synapse Version
{"server_version":"1.75.0rc1 (b=matrix-org-hotfixes,6a185c8b17)","python_version":"3.8.12"}
Installation Method
I don't know
Database
.
Workers
Multiple workers
Platform
.
Configuration
.
Relevant log output
.
Anything else that would be useful to know?
.
The text was updated successfully, but these errors were encountered: