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

don't return non-LL-member state in incremental sync state blocks #3760

Merged
merged 4 commits into from
Aug 28, 2018

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented Aug 24, 2018

Hopefully fixes element-hq/element-web#7223.
Tests over at matrix-org/sytest#487

@ara4n
Copy link
Member Author

ara4n commented Aug 25, 2018

@matrixbot retest this please

@ara4n ara4n requested a review from a team August 25, 2018 10:40
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm assuming I've intuited what this code is doing correctly. Could you add a comment here too please.

@@ -747,7 +747,7 @@ def compute_state_delta(self, room_id, batch, sync_config, since_token, now_toke
if types:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm struggling to remember what this block is for (it's a shame there's no comment). AIUI, this is dealing with the situation that:

  • We're returning an incremental sync, with no "gap" since the previous sync, so normally there would be no state to return
  • But we're lazy-loading, so the client might need some more member events to understand the events in this timeline
  • So we fish out all the member events corresponding to the timeline here, and then dedupe them below

Could you confirm and add a comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed; have added comment.

@ara4n ara4n merged commit b1580f5 into develop Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants