mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-27 01:09:25 -05:00
Only register devices edu handler on the master process (#7255)
This commit is contained in:
parent
4a0dadafbe
commit
fef82f4e22
1
changelog.d/7255.bugfix
Normal file
1
changelog.d/7255.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix a bug that prevented cross-signing with users on worker-mode synapses.
|
@ -54,19 +54,23 @@ class E2eKeysHandler(object):
|
|||||||
|
|
||||||
self._edu_updater = SigningKeyEduUpdater(hs, self)
|
self._edu_updater = SigningKeyEduUpdater(hs, self)
|
||||||
|
|
||||||
|
federation_registry = hs.get_federation_registry()
|
||||||
|
|
||||||
self._is_master = hs.config.worker_app is None
|
self._is_master = hs.config.worker_app is None
|
||||||
if not self._is_master:
|
if not self._is_master:
|
||||||
self._user_device_resync_client = ReplicationUserDevicesResyncRestServlet.make_client(
|
self._user_device_resync_client = ReplicationUserDevicesResyncRestServlet.make_client(
|
||||||
hs
|
hs
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
federation_registry = hs.get_federation_registry()
|
# Only register this edu handler on master as it requires writing
|
||||||
|
# device updates to the db
|
||||||
|
#
|
||||||
# FIXME: switch to m.signing_key_update when MSC1756 is merged into the spec
|
# FIXME: switch to m.signing_key_update when MSC1756 is merged into the spec
|
||||||
federation_registry.register_edu_handler(
|
federation_registry.register_edu_handler(
|
||||||
"org.matrix.signing_key_update",
|
"org.matrix.signing_key_update",
|
||||||
self._edu_updater.incoming_signing_key_update,
|
self._edu_updater.incoming_signing_key_update,
|
||||||
)
|
)
|
||||||
|
|
||||||
# doesn't really work as part of the generic query API, because the
|
# doesn't really work as part of the generic query API, because the
|
||||||
# query request requires an object POST, but we abuse the
|
# query request requires an object POST, but we abuse the
|
||||||
# "query handler" interface.
|
# "query handler" interface.
|
||||||
|
Loading…
Reference in New Issue
Block a user