mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 23:10:20 +00:00
Fix bug when querying remote user keys that require a resync. (#6796)
We ended up only returning a single device, rather than all of them.
This commit is contained in:
parent
fcfb591b31
commit
2cad8baa70
2 changed files with 3 additions and 1 deletions
1
changelog.d/6796.bugfix
Normal file
1
changelog.d/6796.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix bug where querying a remote user's device keys that weren't cached resulted in only returning a single device.
|
|
@ -208,8 +208,9 @@ class E2eKeysHandler(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
user_devices = user_devices["devices"]
|
user_devices = user_devices["devices"]
|
||||||
|
user_results = results.setdefault(user_id, {})
|
||||||
for device in user_devices:
|
for device in user_devices:
|
||||||
results[user_id] = {device["device_id"]: device["keys"]}
|
user_results[device["device_id"]] = device["keys"]
|
||||||
user_ids_updated.append(user_id)
|
user_ids_updated.append(user_id)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
failures[destination] = _exception_to_failure(e)
|
failures[destination] = _exception_to_failure(e)
|
||||||
|
|
Loading…
Reference in a new issue