diff --git a/src/app/organisms/navigation/SideBar.jsx b/src/app/organisms/navigation/SideBar.jsx index eb20b72..5318696 100644 --- a/src/app/organisms/navigation/SideBar.jsx +++ b/src/app/organisms/navigation/SideBar.jsx @@ -92,7 +92,7 @@ function ProfileAvatarMenu() { function CrossSigninAlert() { const deviceList = useDeviceList(); - const unverified = deviceList?.filter((device) => !isCrossVerified(device.device_id)); + const unverified = deviceList?.filter((device) => isCrossVerified(device.device_id) === false); if (!unverified?.length) return null; diff --git a/src/app/organisms/settings/DeviceManage.jsx b/src/app/organisms/settings/DeviceManage.jsx index 5c60bf0..d7efd36 100644 --- a/src/app/organisms/settings/DeviceManage.jsx +++ b/src/app/organisms/settings/DeviceManage.jsx @@ -124,9 +124,16 @@ function DeviceManage() { const unverified = []; const verified = []; + const noEncryption = []; deviceList.sort((a, b) => b.last_seen_ts - a.last_seen_ts).forEach((device) => { - if (isCrossVerified(device.device_id)) verified.push(device); - else unverified.push(device); + const isVerified = isCrossVerified(device.device_id); + if (isVerified === true) { + verified.push(device); + } else if (isVerified === false) { + unverified.push(device); + } else { + noEncryption.push(device); + } }); return (
@@ -145,9 +152,15 @@ function DeviceManage() { { unverified.length > 0 ? unverified.map((device) => renderDevice(device, false)) - : No unverified session + : No unverified sessions }
+ {noEncryption.length > 0 && ( +
+ Sessions without encryption support + {noEncryption.map((device) => renderDevice(device, true))} +
+ )}
Verified sessions { diff --git a/src/util/matrixUtil.js b/src/util/matrixUtil.js index 1b67f7e..16be117 100644 --- a/src/util/matrixUtil.js +++ b/src/util/matrixUtil.js @@ -171,7 +171,8 @@ export function isCrossVerified(deviceId) { const deviceTrust = crossSignInfo.checkDeviceTrust(crossSignInfo, deviceInfo, false, true); return deviceTrust.isCrossSigningVerified(); } catch { - return false; + // device does not support encryption + return null; } }