diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-02-15 11:25:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 11:25:16 +0000 |
commit | 7dcbcca68c6ff463b48c5cbb579b25f2d4cdb99e (patch) | |
tree | e16f953531912739b1abb932136a26a7537c70e9 /synapse/storage/state.py | |
parent | Merge pull request #1917 from matrix-org/dbkr/make_ban_reasons_work (diff) | |
parent | Fix bugs in the /keys/changes api (diff) | |
download | synapse-7dcbcca68c6ff463b48c5cbb579b25f2d4cdb99e.tar.xz |
Merge pull request #1921 from matrix-org/rav/fix_key_changes
Fix bugs in the /keys/changes api
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 1b3800eb6a..84482d8285 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -413,7 +413,19 @@ class StateStore(SQLBaseStore): defer.returnValue({event: event_to_state[event] for event in event_ids}) @defer.inlineCallbacks - def get_state_ids_for_events(self, event_ids, types): + def get_state_ids_for_events(self, event_ids, types=None): + """ + Get the state dicts corresponding to a list of events + + Args: + event_ids(list(str)): events whose state should be returned + types(list[(str, str)]|None): List of (type, state_key) tuples + which are used to filter the state fetched. May be None, which + matches any key + + Returns: + A deferred dict from event_id -> (type, state_key) -> state_event + """ event_to_groups = yield self._get_state_group_for_events( event_ids, ) |