Skip to content
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

Closed

Conversation

BillCarsonFr
Copy link
Member

Fixes #5166
@ganfra Could you have a look at it? and check for any side effects?
Basically EA is relying on theend 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.

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

Unit Test Results

  76 files  ±0    76 suites  ±0   1m 1s ⏱️ +2s
144 tests ±0  144 ✔️ ±0  0 💤 ±0  0 ±0 
452 runs  ±0  452 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 52f4299. ± Comparison against base commit ef3baee.

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

Matrix SDK

Integration Tests Results:

  • [org.matrix.android.sdk.session]
    passed="25" failures="17" errors="0" skipped="2"
  • [org.matrix.android.sdk.account]
    passed="5" failures="0" errors="0" skipped="2"
  • [org.matrix.android.sdk.internal]
    passed="158" failures="1" errors="0" skipped="38"
  • [org.matrix.android.sdk.ordering]
    passed="16" failures="0" errors="0" skipped="0"
  • [org.matrix.android.sdk.PermalinkParserTest]
    passed="2" failures="0" errors="0" skipped="0"

* Synapse is not omitting it and EA was relying on it
*/
val chunkEnd = if (receivedChunk.events.isEmpty()) {
receivedChunk.start
Copy link
Member

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?

Copy link
Contributor

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()) {
Copy link
Contributor

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
Copy link
Contributor

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

@bmarty
Copy link
Member

bmarty commented Jul 1, 2022

#5166 has been fixed by #6318, we think we do not need this change anymore. Closing.

@bmarty bmarty closed this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeated timeline, many read receipts
4 participants