summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-24 13:46:41 +0000
committerErik Johnston <erik@matrix.org>2014-11-24 13:46:41 +0000
commit2bca242fdc397bc5d67a77589bda2a9068f86b4e (patch)
tree3d54e0cb45c431856eee340063bbbc1109fe8502
parentWe don't always want to Auth get_persisted_pdu (diff)
downloadsynapse-2bca242fdc397bc5d67a77589bda2a9068f86b4e.tar.xz
Ask for any auth events that we don't have
Diffstat (limited to '')
-rw-r--r--synapse/federation/replication.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index 4cd17bdb9c..30aab7f35a 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.