Skip to content

Fix MSC4222 returning full state#17915

Merged
erikjohnston merged 4 commits intodevelopfrom
erikj/fix_msc4222
Nov 8, 2024
Merged

Fix MSC4222 returning full state#17915
erikjohnston merged 4 commits intodevelopfrom
erikj/fix_msc4222

Conversation

@erikjohnston
Copy link
Copy Markdown
Member

@erikjohnston erikjohnston commented Nov 8, 2024

There was a bug that meant we would return the full state of the room on incremental syncs when using lazy loaded members and there were no entries in the timeline.

This was due to trying to use state_filter or state_filter.all() as a short hand for handling None case, however state_filter implements __bool__ so if the state filter was empty it would be set to full.

c.f. MSC4222 and #17888

There was a bug that meant we would return the full state of the room on
incremental syncs when using lazy loaded members and there were no
entries in the timeline.

This was due to trying to use `state_filter or state_filter.all()` as a
short hand for handling `None` case, however `state_filter` implements
`__bool__` so if the state filter was empty it would be set to full.
@erikjohnston erikjohnston marked this pull request as ready for review November 8, 2024 14:25
@erikjohnston erikjohnston requested a review from a team as a code owner November 8, 2024 14:25
@erikjohnston erikjohnston merged commit cacd4fd into develop Nov 8, 2024
@erikjohnston erikjohnston deleted the erikj/fix_msc4222 branch November 8, 2024 16:41
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.

3 participants