From 0b6d2f923da0cffa51e85a5674ce13028667ce73 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 16 Jan 2024 09:59:14 +0100 Subject: [PATCH] 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> --- src/rageshake/submit-rageshake.ts | 7 +++---- src/sentry.ts | 9 +++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rageshake/submit-rageshake.ts b/src/rageshake/submit-rageshake.ts index 680dabe4cb..d15f3d9870 100644 --- a/src/rageshake/submit-rageshake.ts +++ b/src/rageshake/submit-rageshake.ts @@ -87,10 +87,9 @@ async function collectBugReport(opts: IOpts = {}, gzipLogs = true): Promise
{ 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();