0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 15:23:50 +01:00

make FederationHandler._make_and_verify_event async

This commit is contained in:
Richard van der Hoff 2020-02-03 16:22:30 +00:00
parent 4286e429a7
commit 3b7e0e002b

View file

@ -1557,15 +1557,20 @@ class FederationHandler(BaseHandler):
return event return event
@defer.inlineCallbacks async def _make_and_verify_event(
def _make_and_verify_event( self,
self, target_hosts, room_id, user_id, membership, content={}, params=None target_hosts: Iterable[str],
): room_id: str,
user_id: str,
membership: str,
content: JsonDict = {},
params: Optional[Dict[str, str]] = None,
) -> Tuple[str, EventBase, RoomVersion]:
( (
origin, origin,
event, event,
room_version, room_version,
) = yield self.federation_client.make_membership_event( ) = await self.federation_client.make_membership_event(
target_hosts, room_id, user_id, membership, content, params=params target_hosts, room_id, user_id, membership, content, params=params
) )