Skip to content

Conversation

@Half-Shot
Copy link
Member

@Half-Shot Half-Shot commented Jan 6, 2026

Fixes #19347

This deprecates MSC2697 which has been closed since May 2024. As per #19347 this seems to be a thing we can just rip out.

Dev notes

Originally introduced by matrix-org/synapse#8380

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@Half-Shot Half-Shot requested a review from a team as a code owner January 6, 2026 15:02
@Half-Shot Half-Shot changed the title Disable msc2697_enabled by default Disable MSC2697 by default Jan 6, 2026
@Half-Shot Half-Shot changed the title Disable MSC2697 by default Remove MSC2697 (legacy dehydrated devices) Jan 6, 2026
Comment on lines -582 to 587
if hs.config.experimental.msc2697_enabled:
DehydratedDeviceServlet(hs).register(http_server)
ClaimDehydratedDeviceServlet(hs).register(http_server)
if hs.config.experimental.msc3814_enabled:
DehydratedDeviceV2Servlet(hs).register(http_server)
DehydratedDeviceEventsServlet(hs).register(http_server)
Copy link
Contributor

Choose a reason for hiding this comment

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

To make it more clear, the legacy MSC2697 implementation is being removed but we still have the MSC3814 implementation in Synapse

And MSC2697 was closed in favor of MSC3814

Comment on lines -372 to -376
result = await self.device_handler.rehydrate_device(
requester.user.to_string(),
self.auth.get_access_token_from_request(request),
submission.device_id,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

rehydrate_device(...) usage is being removed. And it appears like the only usage so we can remove rehydrate_device(...) itself.

And it looks like we can also remove set_device_for_access_token(...), set_device_for_refresh_token(...) as a result as well.

self.store = hs.get_datastores().main
return hs

def test_dehydrate_and_rehydrate_device(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

How did you identify this test as one needing to be removed?

It seems correct but I don't really see any MSC2697 indications beyond rehydrate_device(...).

Perhaps looking at the PR that introduced everything 🤔 matrix-org/synapse#8380

@@ -0,0 +1 @@
MSC2697 (Dehydrated devices) has been removed, as the MSC is closed. Developers should migrate to MSC3814. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the changes to synapse/rest/client/v2_alpha/keys.py from https://github.com/matrix-org/synapse/pull/8380/changes necessary anymore?

I don't see any notes about /keys/upload in MSC3814 like I do for MSC2697

@Half-Shot Half-Shot self-assigned this Jan 9, 2026
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.

Experimental MSC2697 (device dehydration) implementation is enabled by default

3 participants