mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-27 15:05:21 -04:00
Make _get_e2e_device_keys_and_signatures_txn return an attrs (#8224)
this makes it a bit clearer what's going on.
This commit is contained in:
parent
b939251c37
commit
abeab964d5
3 changed files with 41 additions and 20 deletions
|
@ -293,17 +293,17 @@ class DeviceWorkerStore(SQLBaseStore):
|
|||
prev_id = stream_id
|
||||
|
||||
if device is not None:
|
||||
key_json = device.get("key_json", None)
|
||||
key_json = device.key_json
|
||||
if key_json:
|
||||
result["keys"] = db_to_json(key_json)
|
||||
|
||||
if "signatures" in device:
|
||||
for sig_user_id, sigs in device["signatures"].items():
|
||||
if device.signatures:
|
||||
for sig_user_id, sigs in device.signatures.items():
|
||||
result["keys"].setdefault("signatures", {}).setdefault(
|
||||
sig_user_id, {}
|
||||
).update(sigs)
|
||||
|
||||
device_display_name = device.get("device_display_name", None)
|
||||
device_display_name = device.display_name
|
||||
if device_display_name:
|
||||
result["device_display_name"] = device_display_name
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue