element-hq / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://element-hq.github.io/synapse
GNU Affero General Public License v3.0
1.6k stars 201 forks source link

Add experimental support for MSC4222 #17888

Closed erikjohnston closed 2 weeks ago

erikjohnston commented 3 weeks ago

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.