summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-09-14 17:17:07 +0100
committerErik Johnston <erik@matrix.org>2016-09-14 17:29:25 +0100
commit772c6067a368b3f6cf9939641e0547f62ebd3322 (patch)
tree363da0da672deda5ff23d8ef557b532df60ff1cb /synapse/state.py
parentAdd a room visibility stream (diff)
downloadsynapse-772c6067a368b3f6cf9939641e0547f62ebd3322.tar.xz
Refactor public rooms to not pull out the full state for each room
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/state.py b/synapse/state.py
index 4520fa0415..5ce23add5d 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -156,8 +156,9 @@ class StateHandler(object):
         defer.returnValue(state)
 
     @defer.inlineCallbacks
-    def get_current_user_in_room(self, room_id):
-        latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
+    def get_current_user_in_room(self, room_id, latest_event_ids=None):
+        if not latest_event_ids:
+            latest_event_ids = yield self.store.get_latest_event_ids_in_room(room_id)
         entry = yield self.resolve_state_groups(room_id, latest_event_ids)
         joined_users = yield self.store.get_joined_users_from_state(
             room_id, entry.state_id, entry.state