summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-02-07 15:45:39 +0000
committerGitHub <noreply@github.com>2020-02-07 15:45:39 +0000
commit21db35f77e4718cfe6d6b292baada9dd02ef8280 (patch)
tree15385b86ea0820cd2554cbacfc2a1e4a98497c7d /synapse/federation
parentRemove unused `get_room_stats_state` method. (#6869) (diff)
downloadsynapse-21db35f77e4718cfe6d6b292baada9dd02ef8280.tar.xz
Add support for putting fed user query API on workers (#6873)
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_server.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index a6c966a393..7f9da49326 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -81,6 +81,8 @@ class FederationServer(FederationBase):
         self.handler = hs.get_handlers().federation_handler
         self.state = hs.get_state_handler()
 
+        self.device_handler = hs.get_device_handler()
+
         self._server_linearizer = Linearizer("fed_server")
         self._transaction_linearizer = Linearizer("fed_txn_handler")
 
@@ -523,8 +525,9 @@ class FederationServer(FederationBase):
     def on_query_client_keys(self, origin, content):
         return self.on_query_request("client_keys", content)
 
-    def on_query_user_devices(self, origin, user_id):
-        return self.on_query_request("user_devices", user_id)
+    async def on_query_user_devices(self, origin: str, user_id: str):
+        keys = await self.device_handler.on_federation_query_user_devices(user_id)
+        return 200, keys
 
     @trace
     async def on_claim_client_keys(self, origin, content):