Test for cross-signing homeserver support during login, toasts

This adds more checking of homeserver support for cross-signing at login and in
toasts.

Fixes https://github.com/vector-im/riot-web/issues/12228
This commit is contained in:
J. Ryan Stinnett 2020-03-12 18:03:18 +00:00
parent a808b05026
commit b5d532b8cd
3 changed files with 12 additions and 4 deletions

View file

@ -59,9 +59,10 @@ export default class CompleteSecurity extends React.Component {
phase: PHASE_BUSY,
});
const cli = MatrixClientPeg.get();
const backupInfo = await cli.getKeyBackupVersion();
this.setState({backupInfo});
try {
const backupInfo = await cli.getKeyBackupVersion();
this.setState({backupInfo});
await accessSecretStorage(async () => {
await cli.checkOwnCrossSigningTrust();
if (backupInfo) await cli.restoreKeyBackupWithSecretStorage(backupInfo);