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();
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
let devicesSection;
if (isRoomEncrypted) {
devicesSection = <DevicesSection
loading={devices === undefined}
devices={devices} userId={user.userId} />;
}
const securitySection = (
<div className="mx_UserInfo_container">