summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-07-23 13:00:22 +0100
committerErik Johnston <erik@matrix.org>2018-07-23 13:17:22 +0100
commite42510ba635b3e4d83215e4f5634ca51411996e0 (patch)
tree3869fe60b9f56c0f0d157e936538b2a887e78be9 /synapse/api/auth.py
parentMake EventContext lazy load state (diff)
downloadsynapse-e42510ba635b3e4d83215e4f5634ca51411996e0.tar.xz
Use new getters
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py

index bc629832d9..535bdb449d 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py
@@ -65,8 +65,9 @@ class Auth(object): @defer.inlineCallbacks def check_from_context(self, event, context, do_sig_check=True): + prev_state_ids = yield context.get_prev_state_ids(self.store) auth_events_ids = yield self.compute_auth_events( - event, context.prev_state_ids, for_verification=True, + event, prev_state_ids, for_verification=True, ) auth_events = yield self.store.get_events(auth_events_ids) auth_events = { @@ -544,7 +545,8 @@ class Auth(object): @defer.inlineCallbacks def add_auth_events(self, builder, context): - auth_ids = yield self.compute_auth_events(builder, context.prev_state_ids) + prev_state_ids = yield context.get_prev_state_ids(self.store) + auth_ids = yield self.compute_auth_events(builder, prev_state_ids) auth_events_entries = yield self.store.add_event_hashes( auth_ids