You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
Tweak diagnostics for session backup key
This commit is contained in:
@@ -131,7 +131,7 @@ export default class SecureBackupPanel extends React.PureComponent {
|
|||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const secretStorage = cli._crypto._secretStorage;
|
const secretStorage = cli._crypto._secretStorage;
|
||||||
|
|
||||||
const backupKeyStored = await cli.isKeyBackupKeyStored();
|
const backupKeyStored = !!(await cli.isKeyBackupKeyStored());
|
||||||
const backupKeyFromCache = await cli._crypto.getSessionBackupPrivateKey();
|
const backupKeyFromCache = await cli._crypto.getSessionBackupPrivateKey();
|
||||||
const backupKeyCached = !!(backupKeyFromCache);
|
const backupKeyCached = !!(backupKeyFromCache);
|
||||||
const backupKeyWellFormed = backupKeyFromCache instanceof Uint8Array;
|
const backupKeyWellFormed = backupKeyFromCache instanceof Uint8Array;
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ async function collectBugReport(opts: IOpts = {}, gzipLogs = true) {
|
|||||||
body.append("secret_storage_ready", String(await client.isSecretStorageReady()));
|
body.append("secret_storage_ready", String(await client.isSecretStorageReady()));
|
||||||
body.append("secret_storage_key_in_account", String(!!(await secretStorage.hasKey())));
|
body.append("secret_storage_key_in_account", String(!!(await secretStorage.hasKey())));
|
||||||
|
|
||||||
|
body.append("session_backup_key_in_secret_storage", String(!!(await client.isKeyBackupKeyStored())));
|
||||||
const sessionBackupKeyFromCache = await client._crypto.getSessionBackupPrivateKey();
|
const sessionBackupKeyFromCache = await client._crypto.getSessionBackupPrivateKey();
|
||||||
body.append("session_backup_key_cached", String(!!sessionBackupKeyFromCache));
|
body.append("session_backup_key_cached", String(!!sessionBackupKeyFromCache));
|
||||||
body.append("session_backup_key_well_formed", String(sessionBackupKeyFromCache instanceof Uint8Array));
|
body.append("session_backup_key_well_formed", String(sessionBackupKeyFromCache instanceof Uint8Array));
|
||||||
|
|||||||
Reference in New Issue
Block a user