summary refs log tree commit diff
path: root/synapse/federation/transport
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-10-16 20:37:16 +0100
committerRichard van der Hoff <richard@matrix.org>2018-10-17 17:35:26 +0100
commit0fd2321629f4a06bec8b552299d3ced32a7a021c (patch)
tree877e09e23d77f8d41721243b888eaca5b95b0bba /synapse/federation/transport
parentMerge pull request #4052 from matrix-org/rav/ship_resources_as_package_data (diff)
downloadsynapse-0fd2321629f4a06bec8b552299d3ced32a7a021c.tar.xz
Fix incorrect truncation in get_missing_events
It's quite important that get_missing_events returns the *latest* events in the
room; however we were pulling event ids out of the database until we got *at
least* 10, and then taking the *earliest* of the results.

We also shouldn't really be relying on depth, and should be checking the
room_id.
Diffstat (limited to 'synapse/federation/transport')
-rw-r--r--synapse/federation/transport/server.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index 2f874b4838..7288d49074 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -560,7 +560,6 @@ class FederationGetMissingEventsServlet(BaseFederationServlet):
     @defer.inlineCallbacks
     def on_POST(self, origin, content, query, room_id):
         limit = int(content.get("limit", 10))
-        min_depth = int(content.get("min_depth", 0))
         earliest_events = content.get("earliest_events", [])
         latest_events = content.get("latest_events", [])
 
@@ -569,7 +568,6 @@ class FederationGetMissingEventsServlet(BaseFederationServlet):
             room_id=room_id,
             earliest_events=earliest_events,
             latest_events=latest_events,
-            min_depth=min_depth,
             limit=limit,
         )