summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-10 11:59:51 +0000
committerErik Johnston <erik@matrix.org>2014-11-10 11:59:51 +0000
commit6447db063a0d01135582bdfb3392b419f16a19e7 (patch)
tree6f94306775c4344dd695e4b6bb64776ca94bd8de /synapse/api/auth.py
parentNotify users about invites. (diff)
downloadsynapse-6447db063a0d01135582bdfb3392b419f16a19e7.tar.xz
Fix backfill to work. Add auth to backfill request
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 3e5d878eed..48f9d460a3 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -104,6 +104,12 @@ class Auth(object):
             pass
         defer.returnValue(None)
 
+    @defer.inlineCallbacks
+    def check_host_in_room(self, room_id, host):
+        joined_hosts = yield self.store.get_joined_hosts_for_room(room_id)
+
+        defer.returnValue(host in joined_hosts)
+
     def check_event_sender_in_room(self, event):
         key = (RoomMemberEvent.TYPE, event.user_id, )
         member_event = event.state_events.get(key)