summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-16 13:07:48 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 13:09:44 +0000
commit4afac883900fe07c99552bbb6f56414b8b0ec81d (patch)
tree4754085e3c3601eb3458be4b64d6789bf459ee08 /synapse/state.py
parentKill off synapse.api.events.* (diff)
downloadsynapse-4afac883900fe07c99552bbb6f56414b8b0ec81d.tar.xz
Add basic docstring to annotate_context_with_state
Diffstat (limited to '')
-rw-r--r--synapse/state.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py
index d2763cdd9a..2f6eea09aa 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -137,6 +137,17 @@ class StateHandler(object):
 
     @defer.inlineCallbacks
     def annotate_context_with_state(self, event, context, old_state=None):
+        """ Fills out the context with the `current state` of the graph. The
+        `current state` here is defined to be exclusive of the given event,
+        i.e. its the state of the event graph just before the event.
+
+        If `event` has `auth_events` then this will also fill out the
+        `auth_events` field on `context` from the `current_state`.
+
+        Args:
+            event (EventBase)
+            context (EventContext)
+        """
         yield run_on_reactor()
 
         if old_state: