summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-06-12 09:49:51 +0100
committerGitHub <noreply@github.com>2017-06-12 09:49:51 +0100
commita837765e8c3fa31d92b842baae43c22208b9ec07 (patch)
tree330cacdc5ac421c3b4923a3d4380fbf980f72af5 /synapse/api
parentMerge pull request #2269 from matrix-org/erikj/cache_state_delta (diff)
parentTweak SQL (diff)
downloadsynapse-a837765e8c3fa31d92b842baae43c22208b9ec07.tar.xz
Merge pull request #2266 from matrix-org/erikj/host_in_room
Change is_host_joined to use current_state table
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 9dbc7993df..0c297cb022 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -144,17 +144,8 @@ class Auth(object):
     @defer.inlineCallbacks
     def check_host_in_room(self, room_id, host):
         with Measure(self.clock, "check_host_in_room"):
-            latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
-
-            logger.debug("calling resolve_state_groups from check_host_in_room")
-            entry = yield self.state.resolve_state_groups(
-                room_id, latest_event_ids
-            )
-
-            ret = yield self.store.is_host_joined(
-                room_id, host, entry.state_group, entry.state
-            )
-            defer.returnValue(ret)
+            latest_event_ids = yield self.store.is_host_joined(room_id, host)
+            defer.returnValue(latest_event_ids)
 
     def _check_joined_room(self, member, user_id, room_id):
         if not member or member.membership != Membership.JOIN: