Only show devices and verify actions in E2EE rooms

This changes logic to only show the devices list and verify button in E2EE
rooms, matching the design.

Fixes https://github.com/vector-im/riot-web/issues/11839
pull/21833/head
J. Ryan Stinnett 2020-01-21 15:12:59 +00:00
parent 224528afd4
commit 9c0cf326c1
1 changed files with 7 additions and 4 deletions

View File

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