diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-30 11:13:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 11:13:59 -0400 |
commit | d1bf5f7c9d669fcf60aadc2c6527447adef2c43c (patch) | |
tree | f6d7542295976dfab5be1c7759b7a8b917eefe34 /synapse/handlers/federation.py | |
parent | Fix errors in Synapse logs from unit tests. (#10939) (diff) | |
download | synapse-d1bf5f7c9d669fcf60aadc2c6527447adef2c43c.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/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 0a10a5c28a..043ca4a224 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -27,7 +27,12 @@ from unpaddedbase64 import decode_base64 from twisted.internet import defer from synapse import event_auth -from synapse.api.constants import EventTypes, Membership, RejectedReason +from synapse.api.constants import ( + EventContentFields, + EventTypes, + Membership, + RejectedReason, +) from synapse.api.errors import ( AuthError, CodeMessageException, @@ -716,7 +721,7 @@ class FederationHandler(BaseHandler): if include_auth_user_id: event_content[ - "join_authorised_via_users_server" + EventContentFields.AUTHORISING_USER ] = await self._event_auth_handler.get_user_which_could_invite( room_id, state_ids, |