diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index 4d0abdc848..d78ef3ca83 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -233,6 +233,7 @@ export default class DeviceVerifyDialog extends React.Component { sas={this._showSasEvent.sas} onCancel={this._onCancelClick} onDone={this._onSasMatchesClick} + isSelf={MatrixClientPeg.get().getUserId() === this.props.userId} />; } diff --git a/src/components/views/dialogs/IncomingSasDialog.js b/src/components/views/dialogs/IncomingSasDialog.js index 1221e0cb91..0095a0cb93 100644 --- a/src/components/views/dialogs/IncomingSasDialog.js +++ b/src/components/views/dialogs/IncomingSasDialog.js @@ -121,7 +121,7 @@ export default class IncomingSasDialog extends React.Component { const Spinner = sdk.getComponent("views.elements.Spinner"); const BaseAvatar = sdk.getComponent("avatars.BaseAvatar"); - const isSelf = this.props.verifier.userId == MatrixClientPeg.get().credentials.userId; + const isSelf = this.props.verifier.userId == MatrixClientPeg.get().getUserId(); let profile; if (this.state.opponentProfile) { @@ -196,6 +196,7 @@ export default class IncomingSasDialog extends React.Component { sas={this._showSasEvent.sas} onCancel={this._onCancelClick} onDone={this._onSasMatchesClick} + isSelf={this.props.verifier.userId == MatrixClientPeg.get().getUserId()} />; } diff --git a/src/components/views/verification/VerificationShowSas.js b/src/components/views/verification/VerificationShowSas.js index 38bc1bb40a..b92e72c3a7 100644 --- a/src/components/views/verification/VerificationShowSas.js +++ b/src/components/views/verification/VerificationShowSas.js @@ -32,6 +32,7 @@ export default class VerificationShowSas extends React.Component { onDone: PropTypes.func.isRequired, onCancel: PropTypes.func.isRequired, sas: PropTypes.object.isRequired, + isSelf: PropTypes.bool, }; constructor(props) { @@ -66,9 +67,13 @@ export default class VerificationShowSas extends React.Component {
{emojiBlocks.slice(4)} ; - sasCaption = _t( - "Verify this user by confirming the following emoji appear on their screen.", - ); + sasCaption = this.props.isSelf ? + _t( + "Verify the device by confirming the following emoji appers on its screen.", + ): + _t( + "Verify this user by confirming the following emoji appear on their screen.", + ); } else if (this.props.sas.decimal) { const numberBlocks = this.props.sas.decimal.map((num, i) => {num} @@ -76,9 +81,13 @@ export default class VerificationShowSas extends React.Component { sasDisplay =