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

Commit

Permalink
Don't show the 'verify' button if the user is verified
Browse files Browse the repository at this point in the history
Which is more in keeping with the designs (and we can do this now
that the new user info panel is only enabled with cross signing).
  • Loading branch information
dbkr committed Dec 20, 2019
1 parent b998e6f commit a928b33
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit a928b33

Please sign in to comment.