-
Notifications
You must be signed in to change notification settings - Fork 12
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
Sorting threads by most recently responded to #152
Comments
From some discussion elsewhere -- there aren't any APIs in Matrix where a client can modify the sort order of the results (except reversing the result via backwards/forwards flags). This makes one wonder if it would be better to provide a separate API for this. Technically this may be interesting as the server will need to track |
I wonder how this will work given the order will be constantly changing, due to redactions and new threads responses coming in, so backpaginating this custom ordered mixed timeline may race with /sync bringing in new events causing order confusion |
Another meta issue was filed for this, see #195. I'm closing this and opening a separate Synapse one: matrix-org/synapse#13921. |
It is currently difficult for clients to sort threads by the most recently responded to. Clients use the
/messages
API with a filter of"relation_types": ["m.thread"]
to fetch the list of threads in a room. This returns the root thread events in topological order of those events (either forwards or backwards depending on thedir
parameter). Note that each event also includes bundled aggregation, which will include the latest event in each thread.In order to sort threads by the latest event this requires clients to paginate all of the threads in the room, inspect the latest event from the bundled aggregation and attempt to sort by something. There's two issues with this approach:
age
ororigin_server_ts
) doesn't result in the proper ordering (?)Ideally the
/messages
API could return the results in the expected order, by sorting by the latest thread relation message before returning the events.Potential work breakdown
The text was updated successfully, but these errors were encountered: