diff options
author | Erik Johnston <erik@matrix.org> | 2019-11-28 11:31:56 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-11-28 11:31:56 +0000 |
commit | 2173785f0d9124037ca841b568349ad0424b39cd (patch) | |
tree | 467adf4816349298c9f40ab05d1dfa2cac6dba7c /synapse/replication/http | |
parent | MSC2367 Allow reason field on all member events (diff) | |
download | synapse-2173785f0d9124037ca841b568349ad0424b39cd.tar.xz |
Propagate reason in remotely rejected invites
Diffstat (limited to 'synapse/replication/http')
-rw-r--r-- | synapse/replication/http/membership.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/replication/http/membership.py b/synapse/replication/http/membership.py index cc1f249740..3577611fd7 100644 --- a/synapse/replication/http/membership.py +++ b/synapse/replication/http/membership.py @@ -93,6 +93,7 @@ class ReplicationRemoteRejectInviteRestServlet(ReplicationEndpoint): { "requester": ..., "remote_room_hosts": [...], + "content": { ... } } """ @@ -107,7 +108,7 @@ class ReplicationRemoteRejectInviteRestServlet(ReplicationEndpoint): self.clock = hs.get_clock() @staticmethod - def _serialize_payload(requester, room_id, user_id, remote_room_hosts): + def _serialize_payload(requester, room_id, user_id, remote_room_hosts, content): """ Args: requester(Requester) @@ -118,12 +119,14 @@ class ReplicationRemoteRejectInviteRestServlet(ReplicationEndpoint): return { "requester": requester.serialize(), "remote_room_hosts": remote_room_hosts, + "content": content, } async def _handle_request(self, request, room_id, user_id): content = parse_json_object_from_request(request) remote_room_hosts = content["remote_room_hosts"] + event_content = content["content"] requester = Requester.deserialize(self.store, content["requester"]) @@ -134,7 +137,7 @@ class ReplicationRemoteRejectInviteRestServlet(ReplicationEndpoint): try: event = await self.federation_handler.do_remotely_reject_invite( - remote_room_hosts, room_id, user_id + remote_room_hosts, room_id, user_id, event_content, ) ret = event.get_pdu_json() except Exception as e: |