-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Does not return proper prev_batch on /sync #10535
Comments
I've had a quick test and it looks to me like it's working as intended. I've done a sync which brought up event If I request If I request So it looks like Synapse returns a It is weird that this looks quite obviously not like what's happening in matrix-org/sytest#1083, though my poking around leads me to believe this is a symptom of something else and not the source of the issue itself. |
nope, I think this is a real bug, and it's been around for ever: it's a duplicate of #1509. |
Oh, my bad then, somehow I didn't manage to replicate it locally :/ |
I'm not sure what exactly synapse is returning, but whatever it at least seems it doesn't follow the specs.
This related to Sytest's
GET /rooms/:room_id/messages returns a message
test, and matrix-org/sytest#1083What the test does is, as returned by Conduit:
The specification isn't really clear about what needs to be returned for a
/sync
withoutsince
, but that should actually not be a problem. Conduit returns all the events for the room in the test. I assume that Synapse is actually doing the same, or that it will at least include the test message. Under the assumption that the test message was returned in the response to the/sync
, theprev_batch
for that room should then point before the test message.If Sytest then asks for the messages since
prev_batch
, backwards, and it was returned in/sync
, it should not get the test message since it was already returned, but it does get it. So as far as I can see, the reasons the Sytest currently passes are:prev_batch
value doesn't point to the message before the returned eventsprev_batch
, but actually messages after it./sync
did not return the test messageIf I then changed it to return messages between
next_batch
andprev_batch
, it should have returned the message if it was included in the/sync
, but it didn't.The text was updated successfully, but these errors were encountered: