summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 15:39:24 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 15:39:24 +0000
commitd184cbc0319cbff17d04028c265cd774356f6e54 (patch)
tree7fc2ad58d829b4853419e0af434a6a922d8d3a00 /synapse/handlers/federation.py
parentmake FederationHandler.on_make_join_request async (diff)
downloadsynapse-d184cbc0319cbff17d04028c265cd774356f6e54.tar.xz
make FederationHandler.on_send_leave_request async
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r--synapse/handlers/federation.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index e75ebb168e..cdde10c8b9 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1641,9 +1641,7 @@ class FederationHandler(BaseHandler):
 
         return event
 
-    @defer.inlineCallbacks
-    @log_function
-    def on_send_leave_request(self, origin, pdu):
+    async def on_send_leave_request(self, origin, pdu):
         """ We have received a leave event for a room. Fully process it."""
         event = pdu
 
@@ -1663,9 +1661,9 @@ class FederationHandler(BaseHandler):
 
         event.internal_metadata.outlier = False
 
-        context = yield self._handle_new_event(origin, event)
+        context = await self._handle_new_event(origin, event)
 
-        event_allowed = yield self.third_party_event_rules.check_event_allowed(
+        event_allowed = await self.third_party_event_rules.check_event_allowed(
             event, context
         )
         if not event_allowed: