summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-26 13:02:08 +0100
committerErik Johnston <erik@matrix.org>2016-08-26 13:10:56 +0100
commit4daa397a00b1b7080686fde34a3858342e4b0498 (patch)
treeff4b826a956b0890727734063b2895c8e61cefbc /synapse/storage/roommember.py
parentTypo (diff)
downloadsynapse-4daa397a00b1b7080686fde34a3858342e4b0498.tar.xz
Add is_host_joined to slave storage
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 5ce5e8da37..5f15200c20 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -396,6 +396,7 @@ class RoomMemberStore(SQLBaseStore):
             keyvalues={
                 "membership": Membership.JOIN,
             },
+            batch_size=1000,
             desc="_get_joined_users_from_context",
         )
 
@@ -409,8 +410,8 @@ class RoomMemberStore(SQLBaseStore):
             # To do this we set the state_group to a new object as object() != object()
             state_group = object()
 
-        return self._get_joined_users_from_context(
-            room_id, state_group, state_ids
+        return self._is_host_joined(
+            room_id, host, state_group, state_ids
         )
 
     @cachedInlineCallbacks(num_args=3)
@@ -430,7 +431,7 @@ class RoomMemberStore(SQLBaseStore):
                     logger.warn("state_key not user_id: %s", state_key)
                     continue
 
-                event = yield self.store.get_event(event_id, allow_none=True)
+                event = yield self.get_event(event_id, allow_none=True)
                 if event and event.content["membership"] == Membership.JOIN:
                     defer.returnValue(True)