mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-20 12:21:39 -05:00
store: Change the way device keys are loaded.
This commit is contained in:
parent
a114b7b1a9
commit
00f2b51fa9
@ -366,6 +366,8 @@ class PanCtl:
|
||||
key = partition_key(device["ed25519"])
|
||||
color = get_color(device["device_id"])
|
||||
print_formatted_text(HTML(
|
||||
f" - Display name: "
|
||||
f"{device['device_display_name']}\n"
|
||||
f" - Device id: "
|
||||
f"<{color}>{device['device_id']}</{color}>\n"
|
||||
f" - Device key: "
|
||||
|
@ -231,12 +231,15 @@ class PanStore:
|
||||
except IndexError:
|
||||
trust_state = TrustState.unset
|
||||
|
||||
keys = {k.key_type: k.key for k in d.keys}
|
||||
|
||||
device_store[d.user_id][d.device_id] = {
|
||||
"user_id": d.user_id,
|
||||
"device_id": d.device_id,
|
||||
"ed25519": d.fp_key,
|
||||
"curve25519": d.sender_key,
|
||||
"trust_state": trust_state.name
|
||||
"ed25519": keys["ed25519"],
|
||||
"curve25519": keys["curve25519"],
|
||||
"trust_state": trust_state.name,
|
||||
"device_display_name": d.display_name
|
||||
}
|
||||
|
||||
store[account.user_id] = device_store
|
||||
|
Loading…
Reference in New Issue
Block a user