diff options
author | Erik Johnston <erikj@jki.re> | 2018-07-24 09:57:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 09:57:05 +0100 |
commit | 536bc63a4e6833be9c8700f4382949238f8a4bf4 (patch) | |
tree | 5f804ee05b6472691cd12c5cb51d56453d5a367a /synapse/api | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/client_api... (diff) | |
parent | Merge pull request #3584 from matrix-org/erikj/use_cached (diff) | |
download | synapse-536bc63a4e6833be9c8700f4382949238f8a4bf4.tar.xz |
Merge branch 'develop' into erikj/client_apis_move
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 bf9efb170a..073229b4c4 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 |