Element-R: wire up device lists #24833
Labels
A-Element-R
Issues affecting the port of Element's crypto layer to Rust
A-Session-Mgmt
Session / device names, management UI, etc.
O-Frequent
Affects or can be seen by most users regularly or impacts most users' first experience
S-Tolerable
Low/no impact on users
T-Enhancement
We need to implement
MatrixClient.downloadKeys
andMatrixClient.getStoredDevicesForUser
. This is used to populate the device list in the right panel, as well as determining whether we should use an encrypted room when starting DMs with a user (#24429).Broadly, we need to:
OlmMachine.trackedUsers
.OlmMachine.getUserDevices()
and translate the returned info into anIDevice
.downloadUncached
is set, see below), hit/_matrix/client/v3/keys/query
to download the device list, and translate the result of that into anDevice
(new Device model from the js-sdk).I'd like to take the opportunity to clean up the API a bit here, so I'd propose adding a single method to
CryptoApi
:For legacy
Crypto
, we implement this with a thin shim onto the existingCrypto.downloadKeys
andCrypto.getStoredDevicesForUser
. We also replaceMatrixClient.downloadKeys
andMatrixClient.getStoredDevicesForUser
with thin shims ontoCryptoApi.getUserDeviceInfo
.The
forceDownload
parameter ofMatrixClient.downloadKeys
is used in exactly one place (when populating the right panel), and I think we should quietly ignore it: the magical "fix bugs in my caching logic by skipping the cache" logic does more harm than good.findVerificationRequestDMInProgress
andgetStoredCrossSigningForUser
matrix-org/matrix-js-sdk#3315The text was updated successfully, but these errors were encountered: