summary refs log tree commit diff
path: root/synapse/storage/databases/main/devices.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-09-06 23:32:28 +0100
committerRichard van der Hoff <richard@matrix.org>2020-09-06 23:32:28 +0100
commit77b4711bc28c6e1c2c56ae564f93985d21419251 (patch)
tree7308cff3630d81cd97cf9eadb88aeafa6d997b5c /synapse/storage/databases/main/devices.py
parentIn light of #8255, use BIGINTs for destination_rooms (#8256) (diff)
parentAdd cross-signing sigs to the `keys` object (#8234) (diff)
downloadsynapse-77b4711bc28c6e1c2c56ae564f93985d21419251.tar.xz
Merge branch 'release-v1.20.0' into develop
Diffstat (limited to 'synapse/storage/databases/main/devices.py')
-rw-r--r--synapse/storage/databases/main/devices.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py

index f8fe948122..add4e3ea0e 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py
@@ -291,15 +291,9 @@ class DeviceWorkerStore(SQLBaseStore): prev_id = stream_id if device is not None: - key_json = device.key_json - if key_json: - result["keys"] = db_to_json(key_json) - - if device.signatures: - for sig_user_id, sigs in device.signatures.items(): - result["keys"].setdefault("signatures", {}).setdefault( - sig_user_id, {} - ).update(sigs) + keys = device.keys + if keys: + result["keys"] = keys device_display_name = device.display_name if device_display_name: