diff options
author | Erik Johnston <erik@matrix.org> | 2015-01-30 13:34:01 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-01-30 13:34:01 +0000 |
commit | a70a801184814d116ed5b10a952e17c45df7bfc8 (patch) | |
tree | 5242d53c0babb5699ae16a1692bdcd20f7b54942 /synapse/state.py | |
parent | Revert accidental bumping of angluar_sdk dep (diff) | |
download | synapse-a70a801184814d116ed5b10a952e17c45df7bfc8.tar.xz |
Fix bug where we superfluously asked for current state. Change API of /query_auth/ so that we don't duplicate events in the response.
Diffstat (limited to '')
-rw-r--r-- | synapse/state.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/synapse/state.py b/synapse/state.py index d9fdfb34be..e6632978b5 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -166,10 +166,17 @@ class StateHandler(object): first is the name of a state group if one and only one is involved, otherwise `None`. """ + logger.debug("resolve_state_groups event_ids %s", event_ids) + state_groups = yield self.store.get_state_groups( event_ids ) + logger.debug( + "resolve_state_groups state_groups %s", + state_groups.keys() + ) + group_names = set(state_groups.keys()) if len(group_names) == 1: name, state_list = state_groups.items().pop() @@ -205,6 +212,15 @@ class StateHandler(object): if len(v.values()) > 1 } + logger.debug( + "resolve_state_groups Unconflicted state: %s", + unconflicted_state.values(), + ) + logger.debug( + "resolve_state_groups Conflicted state: %s", + conflicted_state.values(), + ) + if event_type: prev_states_events = conflicted_state.get( (event_type, state_key), [] @@ -240,10 +256,6 @@ class StateHandler(object): 1. power levels 2. memberships 3. other events. - - :param conflicted_state: - :param auth_events: - :return: """ resolved_state = {} power_key = (EventTypes.PowerLevels, "") |