diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-12-16 15:59:17 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-12-16 15:59:17 +0000 |
commit | c3eae8a88c21cf99b0109ebcb3f0f49714617060 (patch) | |
tree | 101a0f911b2ffd19fd1fff71516aba7a9f0e006c /synapse/handlers/_base.py | |
parent | clean up coding style a bit (diff) | |
download | synapse-c3eae8a88c21cf99b0109ebcb3f0f49714617060.tar.xz |
Construct the EventContext in the state handler rather than constructing one and then immediately calling state_handler.annotate_context_with_state
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index 567769253e..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 @@ -77,15 +75,10 @@ class BaseHandler(object): state_handler = self.state_handler - context = EventContext() - 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) |