Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3758 from matrix-org/dbkr/hide_verify_if_verified
Browse files Browse the repository at this point in the history
Don't show the 'verify' button if the user is verified
  • Loading branch information
dbkr authored Dec 21, 2019
2 parents 8fbd35f + 376bf7e commit 25f59ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/components/views/right_panel/UserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1286,11 +1286,20 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {

const devicesSection = isRoomEncrypted ?
(<DevicesSection loading={devices === undefined} devices={devices} userId={user.userId} />) : null;

const userVerified = cli.checkUserTrust(user.userId).isVerified();
let verifyButton;
if (!userVerified) {
verifyButton = <AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyDevice(user.userId, null)}>
{_t("Verify")}
</AccessibleButton>;
}

const securitySection = (
<div className="mx_UserInfo_container">
<h3>{ _t("Security") }</h3>
<p>{ text }</p>
<AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyDevice(user.userId, null)}>{_t("Verify")}</AccessibleButton>
{verifyButton}
{ devicesSection }
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1124,8 +1124,8 @@
"This client does not support end-to-end encryption.": "This client does not support end-to-end encryption.",
"Messages in this room are not end-to-end encrypted.": "Messages in this room are not end-to-end encrypted.",
"Messages in this room are end-to-end encrypted.": "Messages in this room are end-to-end encrypted.",
"Security": "Security",
"Verify": "Verify",
"Security": "Security",
"Sunday": "Sunday",
"Monday": "Monday",
"Tuesday": "Tuesday",
Expand Down

0 comments on commit 25f59ed

Please sign in to comment.