summary refs log tree commit diff
path: root/synapse/storage/databases/main/devices.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-20 18:10:20 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-20 18:10:20 +0100
commit15212f54f98355505cabc8c1a72f151d8f59febd (patch)
tree94dc15318379c6e72b9a0118784828fa456fc079 /synapse/storage/databases/main/devices.py
parentMerge commit '7513006b0' into anoa/dinsic_release_1_21_x (diff)
parentMerge branch 'release-v1.20.0' into develop (diff)
downloadsynapse-15212f54f98355505cabc8c1a72f151d8f59febd.tar.xz
Merge commit '77b4711bc' into anoa/dinsic_release_1_21_x
* commit '77b4711bc':
  Add cross-signing sigs to the `keys` object (#8234)
  Unread counts fixes (#8254)
  Fix a regression from calling read_templates. (#8252)
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: