Repository navigation
Conversation
The MSC now fetches the events of a dehydrated device with `GET` and the batch token in the `from` query parameter, and the response omits `next_batch` once there are no more events to retrieve. The previous `POST` definition is kept as `unstable_v1` so homeservers can continue to serve clients that predate the change.
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MSC3814 now fetches the events of a dehydrated device with
GET .../dehydrated_device/{device_id}/events, with the batch token in thefromquery parameter. It also leavesnext_batchout of the response once there are no more events. The MSC commits are matrix-org/matrix-spec-proposals@72c06568 and @9ea19e2f, and Synapse implements them in element-hq/synapse#19896 and #19897.This updates
get_events::unstableto that definition:GETwith#[ruma_api(query)] from.next_batchisskip_serializing_if = "Option::is_none".The previous
POSTdefinition moves unchanged toget_events::unstable_v1, so a homeserver can keep serving clients that still use it, such as matrix-rust-sdk. This follows howupdate_delayed_event::unstable_v1kept the earlier MSC4140 shape.Why it matters: matrix-js-sdk 42 and later uses the GET. A homeserver that only routes the POST answers it with 405. The client then replaces its dehydrated device, and the room keys queued for that device are lost. A
"next_batch": nullon the last page also makes those clients restart paging from the first page indefinitely.The companion Tuwunel change, which serves both methods, is matrix-construct/tuwunel#646.
Checks:
cargo fmtis clean.cargo clippy -p ruma-client-api --features client,server,unstable-msc3814 -- -D warningsis clean.from, server-side query parsing, and a last page withoutnext_batch.