mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:34:52 -04:00
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.
This commit is contained in:
parent
7d84d2523a
commit
d1bf5f7c9d
11 changed files with 46 additions and 25 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue