From a928b33f274adf93cfb8b97a826776f4f0b5934e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 20 Dec 2019 16:51:50 +0000 Subject: [PATCH] Don't show the 'verify' button if the user is verified 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). --- src/components/views/right_panel/UserInfo.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 0ad2cc4dfb..4dd71700ad 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -1286,11 +1286,20 @@ const UserInfo = ({user, groupId, roomId, onClose}) => { const devicesSection = isRoomEncrypted ? () : null; + + const userVerified = cli.checkUserTrust(user.userId).isVerified(); + let verifyButton; + if (!userVerified) { + verifyButton = verifyDevice(user.userId, null)}> + {_t("Verify")} + ; + } + const securitySection = (

{ _t("Security") }

{ text }

- verifyDevice(user.userId, null)}>{_t("Verify")} + {verifyButton} { devicesSection }
);