diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-05 15:06:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-05 15:11:42 +0100 |
commit | 07507643cb6a2fde1a87d229f8d77525627a0632 (patch) | |
tree | 0f776b47e8987cbfaad3be0170601b72e7f9e79c /synapse/state.py | |
parent | Move DictionaryCache (diff) | |
download | synapse-07507643cb6a2fde1a87d229f8d77525627a0632.tar.xz |
Use dictionary cache to do group -> state fetching
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/state.py b/synapse/state.py index 80da90a72c..b5e5d7bbda 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -96,7 +96,7 @@ class StateHandler(object): cache.ts = self.clock.time_msec() state = cache.state else: - res = yield self.resolve_state_groups(event_ids) + res = yield self.resolve_state_groups(room_id, event_ids) state = res[1] if event_type: @@ -155,13 +155,13 @@ class StateHandler(object): if event.is_state(): ret = yield self.resolve_state_groups( - [e for e, _ in event.prev_events], + event.room_id, [e for e, _ in event.prev_events], event_type=event.type, state_key=event.state_key, ) else: ret = yield self.resolve_state_groups( - [e for e, _ in event.prev_events], + event.room_id, [e for e, _ in event.prev_events], ) group, curr_state, prev_state = ret @@ -180,7 +180,7 @@ class StateHandler(object): @defer.inlineCallbacks @log_function - def resolve_state_groups(self, event_ids, event_type=None, state_key=""): + def resolve_state_groups(self, room_id, event_ids, event_type=None, state_key=""): """ Given a list of event_ids this method fetches the state at each event, resolves conflicts between them and returns them. @@ -205,7 +205,7 @@ class StateHandler(object): ) state_groups = yield self.store.get_state_groups( - event_ids + room_id, event_ids ) logger.debug( |