0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-21 03:54:12 +01:00

make FederationClient.make_membership_event.send_request async

This commit is contained in:
Richard van der Hoff 2020-02-03 21:07:13 +00:00
parent 1330c311b7
commit ad09ee9262

View file

@ -471,9 +471,8 @@ class FederationClient(FederationBase):
% (membership, ",".join(valid_memberships)) % (membership, ",".join(valid_memberships))
) )
@defer.inlineCallbacks async def send_request(destination: str) -> Tuple[str, EventBase, RoomVersion]:
def send_request(destination): ret = await self.transport_layer.make_membership_event(
ret = yield self.transport_layer.make_membership_event(
destination, room_id, user_id, membership, params destination, room_id, user_id, membership, params
) )
@ -506,7 +505,7 @@ class FederationClient(FederationBase):
event_dict=pdu_dict, event_dict=pdu_dict,
) )
return (destination, ev, room_version) return destination, ev, room_version
return await self._try_destination_list( return await self._try_destination_list(
"make_" + membership, destinations, send_request "make_" + membership, destinations, send_request