diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-07-23 19:21:37 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-07-23 19:21:37 +0100 |
commit | adfe29ec0bedf394772e30583c271f142bccd3ba (patch) | |
tree | ba4759be562a0f9f9cddc514968fd16e7b0faa90 /synapse/api | |
parent | incorporate review (diff) | |
parent | Merge pull request #3584 from matrix-org/erikj/use_cached (diff) | |
download | synapse-adfe29ec0bedf394772e30583c271f142bccd3ba.tar.xz |
Merge branch 'develop' into matthew/filter_members
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 |