From 2ab39ac4976b7e063a659b300ede24add5e1dce3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 1 Mar 2023 17:33:04 +0000 Subject: misc fixes --- synapse/handlers/event_auth.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'synapse/handlers/event_auth.py') diff --git a/synapse/handlers/event_auth.py b/synapse/handlers/event_auth.py index c508861b6a..272f312fda 100644 --- a/synapse/handlers/event_auth.py +++ b/synapse/handlers/event_auth.py @@ -63,9 +63,19 @@ class EventAuthHandler: self._store, event, batched_auth_events ) auth_event_ids = event.auth_event_ids() - auth_events_by_id = await self._store.get_events(auth_event_ids) + logger.info("Batched auth events %s", list(batched_auth_events.keys())) + logger.info("auth events %s", auth_event_ids) if batched_auth_events: - auth_events_by_id.update(batched_auth_events) + auth_events_by_id = dict(batched_auth_events) + if set(auth_event_ids) - set(batched_auth_events): + logger.info("fetching %s", set(auth_event_ids) - set(batched_auth_events)) + auth_events_by_id.update( + await self._store.get_events( + set(auth_event_ids) - set(batched_auth_events) + ) + ) + else: + auth_events_by_id = await self._store.get_events(auth_event_ids) check_state_dependent_auth_rules(event, auth_events_by_id.values()) def compute_auth_events( -- cgit 1.5.1