diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-30 11:13:59 -0400 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2021-10-01 11:39:17 -0400 |
commit | 32072dcdac0072049832cda6204cd75be2d4e38f (patch) | |
tree | 7db0c73924490e7f5c64abc319dbe3b748859c0d /synapse/federation/federation_client.py | |
parent | 1.44.0rc2 (diff) | |
download | synapse-32072dcdac0072049832cda6204cd75be2d4e38f.tar.xz |
Strip "join_authorised_via_users_server" from join events which do not need it. (#10933)
This fixes a "Event not signed by authorising server" error when transition room member from join -> join, e.g. when updating a display name or avatar URL for restricted rooms.
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r-- | synapse/federation/federation_client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index 584836c04a..2ab4dec88f 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -37,7 +37,7 @@ from typing import ( import attr from prometheus_client import Counter -from synapse.api.constants import EventTypes, Membership +from synapse.api.constants import EventContentFields, EventTypes, Membership from synapse.api.errors import ( CodeMessageException, Codes, @@ -875,9 +875,9 @@ class FederationClient(FederationBase): # If the join is being authorised via allow rules, we need to send # the /send_join back to the same server that was originally used # with /make_join. - if "join_authorised_via_users_server" in pdu.content: + if EventContentFields.AUTHORISING_USER in pdu.content: destinations = [ - get_domain_from_id(pdu.content["join_authorised_via_users_server"]) + get_domain_from_id(pdu.content[EventContentFields.AUTHORISING_USER]) ] return await self._try_destination_list( |