diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-04-27 12:57:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 12:57:46 -0400 |
commit | 57aeeb308b39c4fd455682966eabc9c0fa17c65d (patch) | |
tree | 3b59e2a367f7894a2adfca66c6579fe317723a39 /synapse/federation/federation_server.py | |
parent | Add type hints to schema deltas (#15497) (diff) | |
download | synapse-57aeeb308b39c4fd455682966eabc9c0fa17c65d.tar.xz |
Add support for claiming multiple OTKs at once. (#15468)
MSC3983 provides a way to request multiple OTKs at once from appservices, this extends this concept to the Client-Server API. Note that this will likely be spit out into a separate MSC, but is currently part of MSC3983.
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index c618f3d7a6..ca43c7bfc0 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -1005,13 +1005,8 @@ class FederationServer(FederationBase): @trace async def on_claim_client_keys( - self, origin: str, content: JsonDict, always_include_fallback_keys: bool + self, query: List[Tuple[str, str, str, int]], always_include_fallback_keys: bool ) -> Dict[str, Any]: - query = [] - for user_id, device_keys in content.get("one_time_keys", {}).items(): - for device_id, algorithm in device_keys.items(): - query.append((user_id, device_id, algorithm)) - log_kv({"message": "Claiming one time keys.", "user, device pairs": query}) results = await self._e2e_keys_handler.claim_local_one_time_keys( query, always_include_fallback_keys=always_include_fallback_keys |