From 2bca242fdc397bc5d67a77589bda2a9068f86b4e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 24 Nov 2014 13:46:41 +0000 Subject: [PATCH] Ask for any auth events that we don't have --- synapse/federation/replication.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py index 4cd17bdb9..30aab7f35 100644 --- a/synapse/federation/replication.py +++ b/synapse/federation/replication.py @@ -542,6 +542,21 @@ class ReplicationLayer(object): state = None + # We need to make sure we have all the auth events. + for e_id, _ in pdu.auth_events: + exists = yield self._get_persisted_pdu( + origin, + e_id, + do_auth=False + ) + + if not exists: + yield self.get_pdu( + origin, + event_id=e_id, + ) + logger.debug("Processed pdu %s", e_id) + # Get missing pdus if necessary. if not pdu.outlier: # We only backfill backwards to the min depth.