mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-02-07 18:45:18 -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"])
|
key = partition_key(device["ed25519"])
|
||||||
color = get_color(device["device_id"])
|
color = get_color(device["device_id"])
|
||||||
print_formatted_text(HTML(
|
print_formatted_text(HTML(
|
||||||
|
f" - Display name: "
|
||||||
|
f"{device['device_display_name']}\n"
|
||||||
f" - Device id: "
|
f" - Device id: "
|
||||||
f"<{color}>{device['device_id']}</{color}>\n"
|
f"<{color}>{device['device_id']}</{color}>\n"
|
||||||
f" - Device key: "
|
f" - Device key: "
|
||||||
|
@ -231,12 +231,15 @@ class PanStore:
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
trust_state = TrustState.unset
|
trust_state = TrustState.unset
|
||||||
|
|
||||||
|
keys = {k.key_type: k.key for k in d.keys}
|
||||||
|
|
||||||
device_store[d.user_id][d.device_id] = {
|
device_store[d.user_id][d.device_id] = {
|
||||||
"user_id": d.user_id,
|
"user_id": d.user_id,
|
||||||
"device_id": d.device_id,
|
"device_id": d.device_id,
|
||||||
"ed25519": d.fp_key,
|
"ed25519": keys["ed25519"],
|
||||||
"curve25519": d.sender_key,
|
"curve25519": keys["curve25519"],
|
||||||
"trust_state": trust_state.name
|
"trust_state": trust_state.name,
|
||||||
|
"device_display_name": d.display_name
|
||||||
}
|
}
|
||||||
|
|
||||||
store[account.user_id] = device_store
|
store[account.user_id] = device_store
|
||||||
|
Loading…
x
Reference in New Issue
Block a user