-
-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
improvementAn idea/future MSC for the specAn idea/future MSC for the spec
Description
Suggestion
It's come up in Element Web that we want to present timelines which aggregate the contents of multiple rooms, or in other words, 'overlay' the events from one room on top of another. To do this, the client needs to be able to establish an order between events from different rooms. The question is, how?
A few options come to mind:
- Interleave the overlay events into the timeline based on their
origin_server_ts
. Different servers can have very different clocks though, and events in/messages
responses certainly don't have to be in chronological order, soorigin_server_ts
is neither accurate to the local homeserver's view, nor monotonically increasing. For simple use cases involving only one homeserver, this will do the job, but in all other cases it's approximate at best and can result in the overlay events jumping around as the user scrolls back through history. - Use the
age
field on events to calculate a timestamp relative to the client's local clock, and interleave based on that metric. I don't entirely understand how homeservers calculateage
, but I'd guess this approach is only marginally better thanorigin_server_ts
, if at all. - If
/messages
were changed to use stream ordering (which apparently means "the order in which events arrive at the server"), then servers could include a timestamp in each event's unsigned data indicating when it received the event, which I believe would give us an accurate, monotonically increasing measure to sort by. It requires spec changes, though.
MTRNord
Metadata
Metadata
Assignees
Labels
improvementAn idea/future MSC for the specAn idea/future MSC for the spec