summary refs log tree commit diff
path: root/synapse/federation/replication.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-08 09:08:26 +0000
committerErik Johnston <erik@matrix.org>2014-12-08 09:08:26 +0000
commitd044121168672c657e595525af9b588c8769e9bb (patch)
tree3f79777ad368b4d5d4042a629c53146125fd15b3 /synapse/federation/replication.py
parentStart making more things use EventContext rather than event.* (diff)
downloadsynapse-d044121168672c657e595525af9b588c8769e9bb.tar.xz
Various typos and bug fixes.
Diffstat (limited to 'synapse/federation/replication.py')
-rw-r--r--synapse/federation/replication.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index b11df9e5c6..3af24ee46d 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -558,7 +558,13 @@ class ReplicationLayer(object):
             origin, pdu.event_id, do_auth=False
         )
 
-        if existing and (not existing.outlier or pdu.outlier):
+        already_seen = (
+            existing and (
+                not existing.internal_metadata.outlier
+                or pdu.internal_metadata.outlier
+            )
+        )
+        if already_seen:
             logger.debug("Already seen pdu %s", pdu.event_id)
             defer.returnValue({})
             return
@@ -596,7 +602,7 @@ class ReplicationLayer(object):
         #             )
 
         # Get missing pdus if necessary.
-        if not pdu.outlier:
+        if not pdu.internal_metadata.outlier:
             # We only backfill backwards to the min depth.
             min_depth = yield self.handler.get_min_depth_for_context(
                 pdu.room_id
@@ -663,7 +669,7 @@ class ReplicationLayer(object):
             pdu_json
         )
 
-        builder.internal_metadata = outlier
+        builder.internal_metadata.outlier = outlier
 
         return builder.build()