diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 61b72f650b..519b39d436 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1902,13 +1902,19 @@ export default createReactClass({ const cli = MatrixClientPeg.get(); // We're checking `isCryptoAvailable` here instead of `isCryptoEnabled` // because the client hasn't been started yet. - if (!isCryptoAvailable()) { + const cryptoAvailable = isCryptoAvailable(); + if (!cryptoAvailable) { this._onLoggedIn(); } this.setState({ pendingInitialSync: true }); await this.firstSyncPromise.promise; + if (!cryptoAvailable) { + this.setState({ pendingInitialSync: false }); + return setLoggedInPromise; + } + // 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");