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

Sometimes rooms/{roomId}/messages doesn't sort the messages and misses some #2066

Closed
indefini opened this issue Mar 25, 2017 · 7 comments
Closed

Comments

@indefini
Copy link

I try to get the last 10 messages of a room.
They are not sorted (by time) so I though I would do it in the client.
But I noticed that I didn't really get the last 10 ones.
There were newer messages not returned by /messages.

I also saw this problem on the web riot client. With sync there were no problem but after reloading the web client, I saw some newer messages displayed before old ones.

At first I was checking this for an irc channel, but I also saw it in the matrix hq room.
I have the permalink (from the matrix hq room) if I you want me to post them here, tell me.

@richvdh
Copy link
Member

richvdh commented Apr 4, 2017

correct, /messages sorts by the topological ordering of the room; that's not strictly related to the timestamp.

@richvdh richvdh closed this as completed Apr 4, 2017
@indefini
Copy link
Author

indefini commented Apr 5, 2017

Do you mean that the following is not a problem and should stay the same for a user?

With /sync:
Message 1
Message 2
Message 3

With /messages:
Message 2
Message 1
Message 3

With /messages and limit=2
Message 1
Message 3

Is that ok? I was surprised to see the inconsistency as a user.
This is just an example with 3 messages. in reality I got some messages mixed with other messages from hours before.

@indefini
Copy link
Author

I don't want to insist but I feel like this is a problem, don't you?
Should I open an issue in riot instead?
I will wait another week.

@ara4n
Copy link
Member

ara4n commented Apr 11, 2017

I would expect a fresh /sync and /messages to return the same order. This sounds more as if you are specifying different 'from' tokens or something?

@ara4n
Copy link
Member

ara4n commented Apr 11, 2017

reopening to try to give more detail - @erikjohnston perhaps you can help clarify too.

@ara4n ara4n reopened this Apr 11, 2017
@richvdh
Copy link
Member

richvdh commented Apr 12, 2017

@ara4n: /sync returns in stream ordering. /messages returns in topological ordering. It's certainly possible for them to return events in different orders.

@richvdh richvdh closed this as completed Mar 30, 2020
@richvdh
Copy link
Member

richvdh commented Mar 30, 2020

related #7164

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants