summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-07-23 12:38:46 +0100
committerErik Johnston <erik@matrix.org>2018-07-23 12:56:56 +0100
commit440b8845b531db05e7c4f646e48dee7635cf1f0a (patch)
tree50d6db7ed1ca14601f514c5ae35ba36c1a123dfe /synapse/state.py
parentpep8 (diff)
downloadsynapse-440b8845b531db05e7c4f646e48dee7635cf1f0a.tar.xz
Make EventContext lazy load state
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/state.py b/synapse/state.py
index a708695006..32125c95df 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -219,7 +219,7 @@ class StateHandler(object):
 
             # We don't store state for outliers, so we don't generate a state
             # group for it.
-            context = EventContext(
+            context = EventContext.with_state(
                 state_group=None,
                 current_state_ids=current_state_ids,
                 prev_state_ids=prev_state_ids,
@@ -255,7 +255,7 @@ class StateHandler(object):
                 current_state_ids=current_state_ids,
             )
 
-            context = EventContext(
+            context = EventContext.with_state(
                 state_group=state_group,
                 current_state_ids=current_state_ids,
                 prev_state_ids=prev_state_ids,
@@ -322,7 +322,7 @@ class StateHandler(object):
 
             state_group = entry.state_group
 
-        context = EventContext(
+        context = EventContext.with_state(
             state_group=state_group,
             current_state_ids=current_state_ids,
             prev_state_ids=prev_state_ids,