Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix bug when querying remote user keys that require a resync. #6796

Merged
merged 2 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/6796.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where querying a remote user's device keys that weren't cached resulted in only returning a single device.
3 changes: 2 additions & 1 deletion synapse/handlers/e2e_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ def do_remote_query(destination):
)

user_devices = user_devices["devices"]
user_results = results.setdefault(user_id, {})
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)
except Exception as e:
failures[destination] = _exception_to_failure(e)
Expand Down