summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-08-04 11:08:07 +0100
committerErik Johnston <erik@matrix.org>2015-08-04 11:08:07 +0100
commit413a4c289b0a7bc9655a6f8543ccf1375e2a9e34 (patch)
tree02b0b0ef2688acbe54baa7126933b8044124b304 /synapse/storage/state.py
parentSpeed up event filtering (for ACL) logic (diff)
downloadsynapse-413a4c289b0a7bc9655a6f8543ccf1375e2a9e34.tar.xz
Add comment
Diffstat (limited to '')
-rw-r--r--synapse/storage/state.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 7e9bd232cf..91a5ae86a4 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -265,6 +265,21 @@ class StateStore(SQLBaseStore):
 
     @defer.inlineCallbacks
     def get_state_for_events(self, room_id, event_ids, types):
+        """Given a list of event_ids and type tuples, return a list of state
+        dicts for each event. The state dicts will only have the type/state_keys
+        that are in the `types` list.
+
+        Args:
+            room_id (str)
+            event_ids (list)
+            types (list): List of (type, state_key) tuples which are used to
+                filter the state fetched. `state_key` may be None, which matches
+                any `state_key`
+
+        Returns:
+            deferred: A list of dicts corresponding to the event_ids given.
+            The dicts are mappings from (type, state_key) -> state_events
+        """
         set_types = frozenset(types)
         res = yield defer.gatherResults(
             [