summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-04 14:04:35 +0100
committerErik Johnston <erik@matrix.org>2016-08-04 14:04:35 +0100
commitb4e2290d8951822bb3309b99830a775d9e5826e2 (patch)
tree5333716daa806065b5a59c4815a022b855032e3e /synapse/federation/federation_server.py
parentTidy up get_events (diff)
parentMerge pull request #982 from matrix-org/erikj/fix_port_script (diff)
downloadsynapse-b4e2290d8951822bb3309b99830a775d9e5826e2.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_ids_api
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py20
1 files changed, 1 insertions, 19 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 2b91f93e09..aba19639c7 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -393,27 +393,9 @@ class FederationServer(FederationBase):
             (200, send_content)
         )
 
-    @defer.inlineCallbacks
     @log_function
     def on_query_client_keys(self, origin, content):
-        query = []
-        for user_id, device_ids in content.get("device_keys", {}).items():
-            if not device_ids:
-                query.append((user_id, None))
-            else:
-                for device_id in device_ids:
-                    query.append((user_id, device_id))
-
-        results = yield self.store.get_e2e_device_keys(query)
-
-        json_result = {}
-        for user_id, device_keys in results.items():
-            for device_id, json_bytes in device_keys.items():
-                json_result.setdefault(user_id, {})[device_id] = json.loads(
-                    json_bytes
-                )
-
-        defer.returnValue({"device_keys": json_result})
+        return self.on_query_request("client_keys", content)
 
     @defer.inlineCallbacks
     @log_function