diff options
author | Erik Johnston <erik@matrix.org> | 2018-07-23 13:00:22 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-07-23 13:17:22 +0100 |
commit | e42510ba635b3e4d83215e4f5634ca51411996e0 (patch) | |
tree | 3869fe60b9f56c0f0d157e936538b2a887e78be9 /synapse/api | |
parent | Make EventContext lazy load state (diff) | |
download | synapse-e42510ba635b3e4d83215e4f5634ca51411996e0.tar.xz |
Use new getters
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/auth.py | 6 |
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 |