summary refs log tree commit diff
path: root/synapse/federation/federation_client.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-03-04 14:56:41 +0000
committerDavid Baker <dave@matrix.org>2015-03-04 14:56:41 +0000
commit92b3dc3219ccabc6997c66197a3b879dc49f5597 (patch)
tree083acae90fadadf500918d58754a628feff86351 /synapse/federation/federation_client.py
parentUse if not results rather than len, as per feedback. (diff)
parentFix upgrade instructions (diff)
downloadsynapse-92b3dc3219ccabc6997c66197a3b879dc49f5597.tar.xz
Merge branch 'develop' into pushrules2
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r--synapse/federation/federation_client.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index cd3c962d50..ca89a0787c 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -439,6 +439,25 @@ class FederationClient(FederationBase):
 
         defer.returnValue(ret)
 
+    @defer.inlineCallbacks
+    def get_missing_events(self, destination, room_id, earliest_events,
+                           latest_events, limit, min_depth):
+        content = yield self.transport_layer.get_missing_events(
+            destination, room_id, earliest_events, latest_events, limit,
+            min_depth,
+        )
+
+        events = [
+            self.event_from_pdu_json(e)
+            for e in content.get("events", [])
+        ]
+
+        signed_events = yield self._check_sigs_and_hash_and_fetch(
+            destination, events, outlier=True
+        )
+
+        defer.returnValue(signed_events)
+
     def event_from_pdu_json(self, pdu_json, outlier=False):
         event = FrozenEvent(
             pdu_json