-
Notifications
You must be signed in to change notification settings - Fork 731
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
Fix back pagination conduit #5168
Conversation
Matrix SDKIntegration Tests Results:
|
* Synapse is not omitting it and EA was relying on it | ||
*/ | ||
val chunkEnd = if (receivedChunk.events.isEmpty()) { | ||
receivedChunk.start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReceivedChunk.start should be the same as the from param, so we will be blocked too, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the 'start' is set but 'end' is unset (=null?). Probably chunkEnd=null causes these problems in Element Android
* or because the user does not have permission to see any more events), the end property is omitted from the response. | ||
* Synapse is not omitting it and EA was relying on it | ||
*/ | ||
val chunkEnd = if (receivedChunk.events.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking events.is_empty is wrong here. There may be events, but if those are the 'last' events in the room, 'end' will not be set.
* Synapse is not omitting it and EA was relying on it | ||
*/ | ||
val chunkEnd = if (receivedChunk.events.isEmpty()) { | ||
receivedChunk.start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the 'start' is set but 'end' is unset (=null?). Probably chunkEnd=null causes these problems in Element Android
Fixes #5166
@ganfra Could you have a look at it? and check for any side effects?
Basically EA is relying on the
end
field of /messages call, but as per spec it should be omitted if no events .Conduit is doing as per spec, and it's breaking EA back pagination.