0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 13:23:54 +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
@defer.inlineCallbacks
def _make_and_verify_event(
self, target_hosts, room_id, user_id, membership, content={}, params=None
):
async def _make_and_verify_event(
self,
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,
event,
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
)