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

Add experimental support for MSC4222 #17888

Merged
merged 11 commits into from
Nov 5, 2024
Merged

Add experimental support for MSC4222 #17888

merged 11 commits into from
Nov 5, 2024

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Oct 30, 2024

Basically, if the client sets a special query param on /sync v2 instead of responding with state at the start of the timeline, we instead respond with state_after at the end of the timeline.

We do this by using the current_state_delta_stream table, which is actually reliable, rather than messing around with "state at" points on the timeline.

c.f. MSC4222

Reviewable commit-by-commit.

@github-actions github-actions bot deployed to PR Documentation Preview November 4, 2024 12:50 Active
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

A couple questions, but on the whole looks good.

tests/handlers/test_sync.py Outdated Show resolved Hide resolved
synapse/handlers/sync.py Outdated Show resolved Hide resolved
synapse/handlers/sync.py Outdated Show resolved Hide resolved
@github-actions github-actions bot deployed to PR Documentation Preview November 5, 2024 13:22 Active
@github-actions github-actions bot deployed to PR Documentation Preview November 5, 2024 13:26 Active
@github-actions github-actions bot deployed to PR Documentation Preview November 5, 2024 14:01 Active
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

@erikjohnston erikjohnston enabled auto-merge (squash) November 5, 2024 14:11
@erikjohnston erikjohnston merged commit 361bdaf into develop Nov 5, 2024
41 checks passed
@erikjohnston erikjohnston deleted the erikj/msc4222 branch November 5, 2024 14:45
erikjohnston added a commit that referenced this pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants