Merge pull request #4689 from matrix-org/dbkr/fix_complete_security

Fix the 'complete security' screen
pull/21833/head
David Baker 2020-06-03 14:44:06 +01:00 committed by GitHub
commit caea153962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1900,7 +1900,12 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
return setLoggedInPromise;
}
if (await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")) {
// Test for the master cross-signing key in SSSS as a quick proxy for
// whether cross-signing has been set up on the account.
const masterKeyInStorage = !!cli.getAccountData("m.cross_signing.master");
if (masterKeyInStorage) {
this.setStateForNewView({ view: Views.COMPLETE_SECURITY });
} else if (await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")) {
this.setStateForNewView({ view: Views.E2E_SETUP });
} else {
this.onLoggedIn();