From ec369046712e6de12b1c52bfa05def1a1befefd6 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 15 Mar 2026 00:39:25 +0200 Subject: [PATCH] matrix-synapse: route MSC3814 dehydrated-device APIs to workers Add the unstable MSC3814 dehydrated-device endpoints to both MDAD worker-routing models: - the specialized client_reader bucket - the broad generic_worker route list This is not a docs-driven change. Current workers.md does not meaningfully spell out these paths, but the current Synapse code does mount them via the normal devices servlet registration path, and non-main client workers do not skip that servlet group. That makes these endpoints a good fit for the same worker buckets that already handle the surrounding device- and E2EE-related client APIs. Refs: - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/docs/workers.md#synapseappgeneric_worker - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/client/devices.py#L256-L459 - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/__init__.py#L81-L129 - https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/__init__.py#L179-L197 --- roles/custom/matrix-synapse/vars/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/custom/matrix-synapse/vars/main.yml b/roles/custom/matrix-synapse/vars/main.yml index 1a9416404..bf1cd135d 100644 --- a/roles/custom/matrix-synapse/vars/main.yml +++ b/roles/custom/matrix-synapse/vars/main.yml @@ -39,6 +39,11 @@ matrix_synapse_workers_client_reader_client_server_endpoints: - ^/_matrix/client/(api/v1|r0|v3|unstable)/room_keys/ - ^/_matrix/client/(api/v1|r0|v3|unstable)/keys/(query|changes|claim|room_keys/) + # MSC3814 dehydrated-device APIs: + # Ref: https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/client/devices.py#L256-L459 + - ^/_matrix/client/unstable/org.matrix.msc3814.v1/dehydrated_device$ + - ^/_matrix/client/unstable/org.matrix.msc3814.v1/dehydrated_device/[^/]*/events$ + # Login, registration, account, and profile APIs - ^/_matrix/client/(api/v1|r0|v3|unstable)/login - ^/_matrix/client/(api/v1|r0|v3|unstable)/register(/available|/m.login.registration_token/validity|)? @@ -246,6 +251,10 @@ matrix_synapse_workers_generic_worker_endpoints: - ^/_matrix/client/(r0|v3|unstable)/keys/changes$ - ^/_matrix/client/(r0|v3|unstable)/keys/claim$ - ^/_matrix/client/(r0|v3|unstable)/room_keys/ + # MSC3814 dehydrated-device support: + # Ref: https://github.com/element-hq/synapse/blob/b99a58719b274fcbb327fd8d7649185792bfd12c/synapse/rest/client/devices.py#L256-L459 + - ^/_matrix/client/unstable/org.matrix.msc3814.v1/dehydrated_device$ + - ^/_matrix/client/unstable/org.matrix.msc3814.v1/dehydrated_device/[^/]*/events$ # Registration/login requests - ^/_matrix/client/(api/v1|r0|v3|unstable)/login$