summary refs log tree commit diff
path: root/synapse/federation/federation_client.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-26 16:06:54 +0000
committerErik Johnston <erik@matrix.org>2017-01-26 16:07:24 +0000
commitc974116f197d211ba9b42159fe61cfd5957411b5 (patch)
treeb4d6e71850ba0d371e0463a5cc99439ce8072c40 /synapse/federation/federation_client.py
parentFix up sending of m.device_list_update edus (diff)
downloadsynapse-c974116f197d211ba9b42159fe61cfd5957411b5.tar.xz
Implement device key caching over federation
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r--synapse/federation/federation_client.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index c9175bb33d..b5bcfd705a 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -127,6 +127,16 @@ class FederationClient(FederationBase):
         )
 
     @log_function
+    def query_user_devices(self, destination, user_id, timeout=30000):
+        """Query the device keys for a list of user ids hosted on a remote
+        server.
+        """
+        sent_queries_counter.inc("user_devices")
+        return self.transport_layer.query_user_devices(
+            destination, user_id, timeout
+        )
+
+    @log_function
     def claim_client_keys(self, destination, content, timeout):
         """Claims one-time keys for a device hosted on a remote server.