summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-03-06 17:28:49 +0000
committerKegan Dougal <kegan@matrix.org>2015-03-06 17:28:49 +0000
commit34ce2ca62f261311a9082b6e243eb6c584487025 (patch)
tree0144c0f0a8231e2ea68e23c7d5676f48e42ee775 /synapse/federation/federation_server.py
parentAssign the AS ID from the database; replace old placeholder txn id. (diff)
parentWhen setting display name more graciously handle failures to update room state. (diff)
downloadsynapse-34ce2ca62f261311a9082b6e243eb6c584487025.tar.xz
Merge branch 'develop' into application-services-txn-reliability
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 4264d857be..9c7dcdba96 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -413,12 +413,16 @@ class FederationServer(FederationBase):
                     missing_events = yield self.get_missing_events(
                         origin,
                         pdu.room_id,
-                        earliest_events=list(latest),
-                        latest_events=[pdu.event_id],
+                        earliest_events_ids=list(latest),
+                        latest_events=[pdu],
                         limit=10,
                         min_depth=min_depth,
                     )
 
+                    # We want to sort these by depth so we process them and
+                    # tell clients about them in order.
+                    missing_events.sort(key=lambda x: x.depth)
+
                     for e in missing_events:
                         yield self._handle_new_pdu(
                             origin,