mirror of https://github.com/vector-im/riot-web
Fix missing device keys in rageshakes and sentry reports (#11906)
* fix missing device keys in RS * fix import * fix import * simplify error handling * refact: cleaner keys array creation Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * refact: cleaner keys array creation * jslint --------- Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>pull/28217/head
parent
9254e9562e
commit
0b6d2f923d
|
@ -87,10 +87,9 @@ async function collectBugReport(opts: IOpts = {}, gzipLogs = true): Promise<Form
|
|||
if (cryptoApi) {
|
||||
body.append("crypto_version", cryptoApi.getVersion());
|
||||
|
||||
const keys = [`ed25519:${client.getDeviceEd25519Key()}`];
|
||||
if (client.getDeviceCurve25519Key) {
|
||||
keys.push(`curve25519:${client.getDeviceCurve25519Key()}`);
|
||||
}
|
||||
const ownDeviceKeys = await cryptoApi.getOwnDeviceKeys();
|
||||
const keys = [`curve25519:${ownDeviceKeys.curve25519}`, `ed25519:${ownDeviceKeys.ed25519}`];
|
||||
|
||||
body.append("device_keys", keys.join(", "));
|
||||
|
||||
// add cross-signing status information
|
||||
|
|
|
@ -121,10 +121,11 @@ async function getCryptoContext(client: MatrixClient): Promise<CryptoContext> {
|
|||
if (!cryptoApi) {
|
||||
return {};
|
||||
}
|
||||
const keys = [`ed25519:${client.getDeviceEd25519Key()}`];
|
||||
if (client.getDeviceCurve25519Key) {
|
||||
keys.push(`curve25519:${client.getDeviceCurve25519Key()}`);
|
||||
}
|
||||
|
||||
const ownDeviceKeys = await cryptoApi.getOwnDeviceKeys();
|
||||
|
||||
const keys = [`curve25519:${ownDeviceKeys.curve25519}`, `ed25519:${ownDeviceKeys.ed25519}`];
|
||||
|
||||
const crossSigningStatus = await cryptoApi.getCrossSigningStatus();
|
||||
const secretStorage = client.secretStorage;
|
||||
const sessionBackupKeyFromCache = await cryptoApi.getSessionBackupPrivateKey();
|
||||
|
|
Loading…
Reference in New Issue