diff options
author | Erik Johnston <erikj@jki.re> | 2016-09-15 13:27:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-15 13:27:09 +0100 |
commit | e457034e99d46d32e3d71eddb12cda07d8a0370e (patch) | |
tree | 2b3cc4cbf5a17a6de91c6f07e47b038b22186921 /synapse/state.py | |
parent | Merge pull request #1117 from matrix-org/erikj/fix_state (diff) | |
parent | By default limit /publicRooms to 100 entries (diff) | |
download | synapse-e457034e99d46d32e3d71eddb12cda07d8a0370e.tar.xz |
Merge pull request #1121 from matrix-org/erikj/public_room_paginate
Add pagination support to publicRooms
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/state.py b/synapse/state.py index d89aca26b1..b4eca0e5d5 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -157,8 +157,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 |