diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-25 17:32:22 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-25 17:32:22 +0100 |
commit | a3dc1e9cbe491aa981b8bbaeb2414b4ec8e5b9ca (patch) | |
tree | d7414c7b98aac2aeb1486285cb2774c2273fba1e /synapse/storage/state.py | |
parent | Pull out event ids rather than full events for state (diff) | |
download | synapse-a3dc1e9cbe491aa981b8bbaeb2414b4ec8e5b9ca.tar.xz |
Replace context.current_state with context.current_state_ids
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index fa40af6933..22f7fb1aa1 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -89,17 +89,17 @@ class StateStore(SQLBaseStore): if event.internal_metadata.is_outlier(): continue - if context.current_state is None: + if context.current_state_ids is None: continue if context.state_group is not None: state_groups[event.event_id] = context.state_group continue - state_events = dict(context.current_state) + state_event_ids = dict(context.current_state_ids) if event.is_state(): - state_events[(event.type, event.state_key)] = event + state_event_ids[(event.type, event.state_key)] = event.event_id state_group = context.new_state_group_id @@ -119,12 +119,12 @@ class StateStore(SQLBaseStore): values=[ { "state_group": state_group, - "room_id": state.room_id, - "type": state.type, - "state_key": state.state_key, - "event_id": state.event_id, + "room_id": event.room_id, + "type": key[0], + "state_key": key[1], + "event_id": state_id, } - for state in state_events.values() + for key, state_id in state_event_ids.items() ], ) state_groups[event.event_id] = state_group |