diff --git a/src/components/structures/auth/SoftLogout.js b/src/components/structures/auth/SoftLogout.js index 57deee7175..0c589c5bb1 100644 --- a/src/components/structures/auth/SoftLogout.js +++ b/src/components/structures/auth/SoftLogout.js @@ -64,6 +64,7 @@ export default class SoftLogout extends React.Component { userId, displayName, loginView: LOGIN_VIEW.LOADING, + keyBackupNeeded: true, // assume we do while we figure it out (see componentWillMount) busy: false, password: "", @@ -73,6 +74,10 @@ export default class SoftLogout extends React.Component { componentDidMount(): void { this._initLogin(); + + MatrixClientPeg.get().flagAllGroupSessionsForBackup().then(remaining => { + this.setState({keyBackupNeeded: remaining > 0}); + }); } onClearAll = () => { @@ -160,9 +165,16 @@ export default class SoftLogout extends React.Component { error = {this.state.errorText}; } + let introText = _t("Enter your password to sign in and regain access to your account."); + if (this.state.keyBackupNeeded) { + introText = _t( + "Regain access your account and recover encryption keys stored on this device. " + + "Without them, you won’t be able to read all of your secure messages on any device."); + } + return (