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
This commit is contained in:
parent
224528afd4
commit
9c0cf326c1
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||||
|
if (isRoomEncrypted) {
|
||||||
|
devicesSection = <DevicesSection
|
||||||
loading={devices === undefined}
|
loading={devices === undefined}
|
||||||
devices={devices} userId={user.userId} />;
|
devices={devices} userId={user.userId} />;
|
||||||
|
}
|
||||||
|
|
||||||
const securitySection = (
|
const securitySection = (
|
||||||
<div className="mx_UserInfo_container">
|
<div className="mx_UserInfo_container">
|
||||||
|
|
Loading…
Reference in a new issue