diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-02-03 16:22:30 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-02-03 16:22:30 +0000 |
commit | 3b7e0e002bad4ba39e9d4b4188fae0132571bded (patch) | |
tree | 6f57dffe716d72ce6a2bfb0a27ee3530937d3062 /synapse/handlers/federation.py | |
parent | make FederationHandler.do_remotely_reject_invite async (diff) | |
download | synapse-3b7e0e002bad4ba39e9d4b4188fae0132571bded.tar.xz |
make FederationHandler._make_and_verify_event async
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/federation.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 73ef130ace..e5fa55b973 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -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 ) |