Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a6b9338

Browse files
committed
Only register devices edu handler on the master process (#7255)
1 parent e767ac5 commit a6b9338

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

changelog.d/7255.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug that prevented cross-signing with users on worker-mode synapses.

synapse/handlers/e2e_keys.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,23 @@ def __init__(self, hs):
5454

5555
self._edu_updater = SigningKeyEduUpdater(hs, self)
5656

57+
federation_registry = hs.get_federation_registry()
58+
5759
self._is_master = hs.config.worker_app is None
5860
if not self._is_master:
5961
self._user_device_resync_client = ReplicationUserDevicesResyncRestServlet.make_client(
6062
hs
6163
)
64+
else:
65+
# Only register this edu handler on master as it requires writing
66+
# device updates to the db
67+
#
68+
# FIXME: switch to m.signing_key_update when MSC1756 is merged into the spec
69+
federation_registry.register_edu_handler(
70+
"org.matrix.signing_key_update",
71+
self._edu_updater.incoming_signing_key_update,
72+
)
6273

63-
federation_registry = hs.get_federation_registry()
64-
65-
# FIXME: switch to m.signing_key_update when MSC1756 is merged into the spec
66-
federation_registry.register_edu_handler(
67-
"org.matrix.signing_key_update",
68-
self._edu_updater.incoming_signing_key_update,
69-
)
7074
# doesn't really work as part of the generic query API, because the
7175
# query request requires an object POST, but we abuse the
7276
# "query handler" interface.

0 commit comments

Comments
 (0)