mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 13:23:54 +01:00
Fix MSC3983 support: only one OTK per device was returned through federation (#15770)
This commit is contained in:
parent
0757d59ec4
commit
59ec4a0dc1
2 changed files with 4 additions and 1 deletions
1
changelog.d/15770.bugfix
Normal file
1
changelog.d/15770.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix requesting multiple keys at once over federation, related to [MSC3983](https://github.com/matrix-org/matrix-spec-proposals/pull/3983).
|
|
@ -1016,7 +1016,9 @@ class FederationServer(FederationBase):
|
||||||
for user_id, device_keys in result.items():
|
for user_id, device_keys in result.items():
|
||||||
for device_id, keys in device_keys.items():
|
for device_id, keys in device_keys.items():
|
||||||
for key_id, key in keys.items():
|
for key_id, key in keys.items():
|
||||||
json_result.setdefault(user_id, {})[device_id] = {key_id: key}
|
json_result.setdefault(user_id, {}).setdefault(device_id, {})[
|
||||||
|
key_id
|
||||||
|
] = key
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
"Claimed one-time-keys: %s",
|
"Claimed one-time-keys: %s",
|
||||||
|
|
Loading…
Reference in a new issue