mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 21:44:48 -04:00
Add cross-signing sigs to the keys
object (#8234)
All the callers want this info in the same place, so let's reduce the duplication by doing it here.
This commit is contained in:
parent
041ee971c9
commit
f25af1f9c7
3 changed files with 18 additions and 34 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue