summary refs log tree commit diff
path: root/synapse/handlers/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-16 18:35:46 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 18:35:46 +0000
commitf76269392b17d2dbabc85579300d9eef9a559d4e (patch)
tree94036377e17568e6983d6aeb2a73b827a277a580 /synapse/handlers/_base.py
parentUse is_outlier() so that we don't get AttributeError (diff)
parentMerge branch 'release-v0.6.0' into develop (diff)
downloadsynapse-f76269392b17d2dbabc85579300d9eef9a559d4e.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.6.0
Conflicts:
	synapse/state.py
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r--synapse/handlers/_base.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index af8eb5f0f5..97ebd98917 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -20,8 +20,6 @@ from synapse.util.async import run_on_reactor
 from synapse.crypto.event_signing import add_hashes_and_signatures
 from synapse.api.constants import Membership, EventTypes
 
-from synapse.events.snapshot import EventContext
-
 import logging
 
 
@@ -61,8 +59,6 @@ class BaseHandler(object):
     def _create_new_client_event(self, builder):
         yield run_on_reactor()
 
-        context = EventContext()
-
         latest_ret = yield self.store.get_latest_events_in_room(
             builder.room_id,
         )
@@ -78,14 +74,11 @@ class BaseHandler(object):
         builder.depth = depth
 
         state_handler = self.state_handler
-        ret = yield state_handler.annotate_context_with_state(
-            builder,
-            context,
-        )
-        prev_state = ret
+
+        context = yield state_handler.compute_event_context(builder)
 
         if builder.is_state():
-            builder.prev_state = prev_state
+            builder.prev_state = context.prev_state_events
 
         yield self.auth.add_auth_events(builder, context)