-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support unread message counts server-side #2632
Comments
I agree that the balance is wrong, and irritatingly I'm failing to remember how we've ended up like this. Just to confirm the current situation:
You're right that it doesn't track the number of unread messages in general though, and this has to be inferred by the client by looping through all the messages which the client has received in a room since we last sent a Read Receipt, and summing them up. Possible reasons for this are:
In practice, calculating the unread counts clientside is still a trainwreck, as evinced by element-hq/element-web#3363, so we really do need to find a way to fix this. Perhaps one solution would be to define stricter rules on the events which should constitute an "unread messages" in the spec, and thus have that metric be consistent across all clients. This could in turn tie into the long-awaited "human readable event representation" work (matrix-org/matrix-spec-proposals#92 and its many descendants), as in the end the concept of "unreadness" is very much a human representation question. The same metric that we use to decide that a message is human readable could then also be used to calculate unreadness serverside, and everyone wins. |
+1 |
To summarise the current situation:
It's true that the server could guess which events the client can render, but this feels like it could be fragile and lead to further unpredictable behaviour. Alternatively, we could mandate which events the client should try to render (showing fallback if they can't) - for instance, when matrix-org/matrix-spec-proposals#1767 comes to pass, we could declare that any event with an This would then (modulo performance considerations) let us calculate full unread counts serverside - which could be useful for "catch up on the last 100 unread messages in this room" style UIs. However, we've got by without these semantics so far without missing it that much. It would be necessary for full parity with Slack however. This is unlikely to happen anytime soon unless someone desperately wants it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
this is related to matrix-org/matrix-spec-proposals#2654, though I don't think it will do much to change the situation here. |
This is way too much code to be implemented in every client [1]
[1] matrix-org/matrix-python-sdk#161
The text was updated successfully, but these errors were encountered: