Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Replace uses of checkDeviceTrust with getDeviceVerificationStatus #10663

Merged
merged 12 commits into from
Apr 24, 2023
2 changes: 1 addition & 1 deletion src/DeviceListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default class DeviceListener {

const deviceTrust = await cli
.getCrypto()
?.getDeviceVerificationStatus(cli.getUserId()!, device.deviceId!);
!.getDeviceVerificationStatus(cli.getUserId()!, device.deviceId!);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ! needs to be on .getCrypto()!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bah

if (!deviceTrust?.crossSigningVerified && !this.dismissed.has(device.deviceId)) {
if (this.ourDeviceIdsAtStart?.has(device.deviceId)) {
oldUnverifiedDeviceIds.add(device.deviceId);
Expand Down
3 changes: 1 addition & 2 deletions src/components/views/right_panel/UserInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1626,9 +1626,8 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
const e2eStatus = useAsyncMemo(async () => {
if (!isRoomEncrypted || !devices) {
return undefined;
} else {
return await getE2EStatus(cli, user.userId, devices);
}
return await getE2EStatus(cli, user.userId, devices);
}, [cli, isRoomEncrypted, user.userId, devices]);

const classes = ["mx_UserInfo"];
Expand Down