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 MSC4222 returning full state #17915

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Fix MSC4222 returning full state #17915

merged 4 commits into from
Nov 8, 2024

Conversation

erikjohnston
Copy link
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
synapse/rest/client/sync.py Outdated Show resolved Hide resolved
@erikjohnston erikjohnston merged commit cacd4fd into develop Nov 8, 2024
39 checks passed
@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