diff --git a/src/DeviceListener.js b/src/DeviceListener.js index 6a506db496..346be4bd13 100644 --- a/src/DeviceListener.js +++ b/src/DeviceListener.js @@ -107,7 +107,10 @@ export default class DeviceListener { ) return; if (!cli.isCryptoEnabled()) return; - if (!cli.getCrossSigningId()) { + + const crossSigningReady = await cli.crossSigningReady(); + + if (!crossSigningReady) { if (this._dismissedThisDeviceToast) { ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY); return; diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index d583210c9a..0df75f16bc 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -74,12 +74,14 @@ export default class CrossSigningPanel extends React.PureComponent { const secretStorageKeyInAccount = await secretStorage.hasKey(); const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"); + const crossSigningReady = await cli.crossSigningReady(); this.setState({ crossSigningPublicKeysOnDevice, crossSigningPrivateKeysInStorage, secretStorageKeyInAccount, homeserverSupportsCrossSigning, + crossSigningReady, }); } @@ -124,6 +126,7 @@ export default class CrossSigningPanel extends React.PureComponent { crossSigningPrivateKeysInStorage, secretStorageKeyInAccount, homeserverSupportsCrossSigning, + crossSigningReady, } = this.state; let errorSection; @@ -139,11 +142,14 @@ export default class CrossSigningPanel extends React.PureComponent { ); let summarisedStatus; - if (!homeserverSupportsCrossSigning) { + if (homeserverSupportsCrossSigning === undefined) { + const InlineSpinner = sdk.getComponent('views.elements.InlineSpinner'); + summarisedStatus =
{_t( "Your homeserver does not support cross-signing.", )}
; - } else if (enabledForAccount && crossSigningPublicKeysOnDevice) { + } else if (crossSigningReady) { summarisedStatus =✅ {_t( "Cross-signing and secret storage are enabled.", )}
;