chore: fix unexpected null when device is not known
This commit is contained in:
parent
519128ebde
commit
bfda82bb45
|
|
@ -938,13 +938,14 @@ class KeyVerification {
|
||||||
'[Key Verification] Tried to broadcast and un-broadcastable type: $type');
|
'[Key Verification] Tried to broadcast and un-broadcastable type: $type');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (client.userDeviceKeys[userId]?.deviceKeys[deviceId] == null) {
|
if (client.userDeviceKeys[userId]?.deviceKeys[deviceId] != null) {
|
||||||
|
await client.sendToDeviceEncrypted(
|
||||||
|
[client.userDeviceKeys[userId]!.deviceKeys[deviceId]!],
|
||||||
|
type,
|
||||||
|
payload);
|
||||||
|
} else {
|
||||||
Logs().e('[Key Verification] Unknown device');
|
Logs().e('[Key Verification] Unknown device');
|
||||||
}
|
}
|
||||||
await client.sendToDeviceEncrypted(
|
|
||||||
[client.userDeviceKeys[userId]!.deviceKeys[deviceId]!],
|
|
||||||
type,
|
|
||||||
payload);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue