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

Only display bulk unverified sessions nag when current session is verified (PSG-893) #9656

Merged
merged 10 commits into from
Dec 2, 2022
Prev Previous commit
Next Next commit
really fix strict error
  • Loading branch information
Kerry Archibald committed Nov 30, 2022
commit 3ecbd43f901c2a95b1dc6897ab53642f6084db15
4 changes: 2 additions & 2 deletions src/DeviceListener.ts
Original file line number Diff line number Diff line change
@@ -307,7 +307,7 @@ export default class DeviceListener {
const newUnverifiedDeviceIds = new Set<string>();

const isCurrentDeviceTrusted = crossSigningReady &&
await (cli.checkDeviceTrust(cli.getUserId()!, cli.deviceId)).isCrossSigningVerified();
await (cli.checkDeviceTrust(cli.getUserId()!, cli.deviceId!)).isCrossSigningVerified();

// as long as cross-signing isn't ready,
// you can't see or dismiss any device toasts
@@ -316,7 +316,7 @@ export default class DeviceListener {
for (const device of devices) {
if (device.deviceId === cli.deviceId) continue;

const deviceTrust = await cli.checkDeviceTrust(cli.getUserId(), device.deviceId);
const deviceTrust = await cli.checkDeviceTrust(cli.getUserId()!, device.deviceId!);
if (!deviceTrust.isCrossSigningVerified() && !this.dismissed.has(device.deviceId)) {
if (this.ourDeviceIdsAtStart.has(device.deviceId)) {
oldUnverifiedDeviceIds.add(device.deviceId);