Merge pull request #3889 from matrix-org/jryans/hide-verif-unless-e2e

Only show devices and verify actions in E2EE rooms
This commit is contained in:
J. Ryan Stinnett 2020-01-21 16:52:08 +00:00 committed by GitHub
commit d6b6a4cdfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1308,15 +1308,18 @@ const UserInfo = ({user, groupId, roomId, onClose}) => {
userTrust.isVerified(); userTrust.isVerified();
const isMe = user.userId === cli.getUserId(); const isMe = user.userId === cli.getUserId();
let verifyButton; let verifyButton;
if (!userVerified && !isMe) { if (isRoomEncrypted && !userVerified && !isMe) {
verifyButton = <AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyUser(user)}> verifyButton = <AccessibleButton className="mx_UserInfo_verify" onClick={() => verifyUser(user)}>
{_t("Verify")} {_t("Verify")}
</AccessibleButton>; </AccessibleButton>;
} }
const devicesSection = <DevicesSection let devicesSection;
loading={devices === undefined} if (isRoomEncrypted) {
devices={devices} userId={user.userId} />; devicesSection = <DevicesSection
loading={devices === undefined}
devices={devices} userId={user.userId} />;
}
const securitySection = ( const securitySection = (
<div className="mx_UserInfo_container"> <div className="mx_UserInfo_container">