From 05c1c838f221bc778c7b27db9a20d5ff4767c4a6 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 21 Dec 2015 18:32:23 +0000 Subject: [PATCH] Use the returned backfill events to fill in any missing auth events before reaching out a second time to fetch them --- synapse/handlers/federation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 28f2ff68d6..8a4fc07bbf 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -346,6 +346,11 @@ class FederationHandler(BaseHandler): a_id for event in all_events for a_id, _ in event.auth_events ) + for e_id in required_auth: + if e_id not in auth_events and e_id in event_ids: + auth_events[e_id] = event_map[e_id] + # TODO(paul): we should also inspect our local database here + missing_auth = required_auth - set(auth_events) results = yield defer.gatherResults( [