diff --git a/src/components/structures/auth/SetupEncryptionBody.js b/src/components/structures/auth/SetupEncryptionBody.js
index 3e7264dfec..d2b3fbd3b9 100644
--- a/src/components/structures/auth/SetupEncryptionBody.js
+++ b/src/components/structures/auth/SetupEncryptionBody.js
@@ -19,6 +19,8 @@ import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
import SdkConfig from '../../../SdkConfig';
import { MatrixClientPeg } from '../../../MatrixClientPeg';
+import Modal from '../../../Modal';
+import VerificationRequestDialog from '../../views/dialogs/VerificationRequestDialog';
import * as sdk from '../../../index';
import {
SetupEncryptionStore,
@@ -81,6 +83,22 @@ export default class SetupEncryptionBody extends React.Component {
store.usePassPhrase();
}
+ _onVerifyClick = () => {
+ const cli = MatrixClientPeg.get();
+ const userId = cli.getUserId();
+ const requestPromise = cli.requestVerification(userId);
+
+ this.props.onFinished(true);
+ Modal.createTrackedDialog('New Session Verification', 'Starting dialog', VerificationRequestDialog, {
+ verificationRequestPromise: requestPromise,
+ member: cli.getUser(userId),
+ onFinished: async () => {
+ const request = await requestPromise;
+ request.cancel();
+ },
+ });
+ }
+
onSkipClick = () => {
const store = SetupEncryptionStore.sharedInstance();
store.skip();
@@ -132,32 +150,24 @@ export default class SetupEncryptionBody extends React.Component {
;
}
+ let verifyButton;
+ if (store.hasDevicesToVerifyAgainst) {
+ verifyButton =
{_t( - "Confirm your identity by verifying this login from one of your other sessions, " + - "granting it access to encrypted messages.", + "Verify this login to access your encrypted messages and " + + "prove to others that this login is really you." )}
-{_t( - "This requires the latest %(brand)s on your other devices:", - { brand }, - )}
- -{_t("or another cross-signing capable Matrix client")}
-