fix: missing null check
This commit is contained in:
parent
6f0c7c5f64
commit
fe9145d580
|
|
@ -603,6 +603,9 @@ 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');
|
||||
}
|
||||
await client.sendToDeviceEncrypted(
|
||||
[client.userDeviceKeys[userId].deviceKeys[deviceId]],
|
||||
type,
|
||||
|
|
|
|||
|
|
@ -1963,6 +1963,7 @@ class Client extends MatrixApi {
|
|||
// then only send it to verified devices
|
||||
if (deviceKeys.isNotEmpty) {
|
||||
deviceKeys.removeWhere((DeviceKeys deviceKeys) =>
|
||||
deviceKeys == null ||
|
||||
deviceKeys.blocked ||
|
||||
(deviceKeys.userId == userID && deviceKeys.deviceId == deviceID) ||
|
||||
(onlyVerified && !deviceKeys.verified));
|
||||
|
|
|
|||
Loading…
Reference in New Issue