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');
|
||||
}
|
||||
} else {
|
||||
if (client.userDeviceKeys[userId]?.deviceKeys[deviceId] == null) {
|
||||
Logs().e('[Key Verification] Unknown device');
|
||||
}
|
||||
if (client.userDeviceKeys[userId]?.deviceKeys[deviceId] != null) {
|
||||
await client.sendToDeviceEncrypted(
|
||||
[client.userDeviceKeys[userId]!.deviceKeys[deviceId]!],
|
||||
type,
|
||||
payload);
|
||||
} else {
|
||||
Logs().e('[Key Verification] Unknown device');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue