From 8c5f3d6d9428e6d971604cc95782b4b75988535c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 19 Dec 2019 16:43:55 +0000 Subject: [PATCH] show devices and unverify action also in unencrypted rooms --- src/components/views/right_panel/UserInfo.js | 24 ++++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 542e010edd..0f248d65d4 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -1249,15 +1249,13 @@ const UserInfo = ({user, groupId, roomId, onClose}) => { setDevices(null); } } - if (isRoomEncrypted) { - _downloadDeviceList(); - } + _downloadDeviceList(); // Handle being unmounted return () => { cancelled = true; }; - }, [cli, user.userId, isRoomEncrypted]); + }, [cli, user.userId]); // Listen to changes useEffect(() => { @@ -1273,18 +1271,13 @@ const UserInfo = ({user, groupId, roomId, onClose}) => { }); } }; - - if (isRoomEncrypted) { - cli.on("deviceVerificationChanged", onDeviceVerificationChanged); - } + cli.on("deviceVerificationChanged", onDeviceVerificationChanged); // Handle being unmounted return () => { cancel = true; - if (isRoomEncrypted) { - cli.removeListener("deviceVerificationChanged", onDeviceVerificationChanged); - } + cli.removeListener("deviceVerificationChanged", onDeviceVerificationChanged); }; - }, [cli, user.userId, isRoomEncrypted]); + }, [cli, user.userId]); let text; if (!isRoomEncrypted) { @@ -1299,9 +1292,6 @@ const UserInfo = ({user, groupId, roomId, onClose}) => { text = _t("Messages in this room are end-to-end encrypted."); } - const devicesSection = isRoomEncrypted ? - () : null; - const userVerified = cli.checkUserTrust(user.userId).isVerified(); let verifyButton; if (!userVerified) { @@ -1310,6 +1300,10 @@ const UserInfo = ({user, groupId, roomId, onClose}) => { ; } + const devicesSection = ; + const securitySection = (

{ _t("Security") }