summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-19 17:24:14 +0000
committerErik Johnston <erik@matrix.org>2015-02-19 17:24:14 +0000
commit0ac2a79faa918280767c18e4db7ec29d7d3a3afb (patch)
treea2495f72dee1b8e08947067fe81eb7e7f91cc527 /synapse/handlers/federation.py
parentUpdate CHANGES.rst with missing changes (diff)
downloadsynapse-0ac2a79faa918280767c18e4db7ec29d7d3a3afb.tar.xz
Initial stab at implementing a batched get_missing_pdus request
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r--synapse/handlers/federation.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 0eb2ff95ca..26bdc6d1a7 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -581,12 +581,13 @@ class FederationHandler(BaseHandler):
         defer.returnValue(event)
 
     @defer.inlineCallbacks
-    def get_state_for_pdu(self, origin, room_id, event_id):
+    def get_state_for_pdu(self, origin, room_id, event_id, do_auth=True):
         yield run_on_reactor()
 
-        in_room = yield self.auth.check_host_in_room(room_id, origin)
-        if not in_room:
-            raise AuthError(403, "Host not in room.")
+        if do_auth:
+            in_room = yield self.auth.check_host_in_room(room_id, origin)
+            if not in_room:
+                raise AuthError(403, "Host not in room.")
 
         state_groups = yield self.store.get_state_groups(
             [event_id]