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');
|
'[Key Verification] Tried to broadcast and un-broadcastable type: $type');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (client.userDeviceKeys[userId].deviceKeys[deviceId] == null) {
|
||||||
|
Logs().e('[Key Verification] Unknown device');
|
||||||
|
}
|
||||||
await client.sendToDeviceEncrypted(
|
await client.sendToDeviceEncrypted(
|
||||||
[client.userDeviceKeys[userId].deviceKeys[deviceId]],
|
[client.userDeviceKeys[userId].deviceKeys[deviceId]],
|
||||||
type,
|
type,
|
||||||
|
|
|
||||||
|
|
@ -1963,6 +1963,7 @@ class Client extends MatrixApi {
|
||||||
// then only send it to verified devices
|
// then only send it to verified devices
|
||||||
if (deviceKeys.isNotEmpty) {
|
if (deviceKeys.isNotEmpty) {
|
||||||
deviceKeys.removeWhere((DeviceKeys deviceKeys) =>
|
deviceKeys.removeWhere((DeviceKeys deviceKeys) =>
|
||||||
|
deviceKeys == null ||
|
||||||
deviceKeys.blocked ||
|
deviceKeys.blocked ||
|
||||||
(deviceKeys.userId == userID && deviceKeys.deviceId == deviceID) ||
|
(deviceKeys.userId == userID && deviceKeys.deviceId == deviceID) ||
|
||||||
(onlyVerified && !deviceKeys.verified));
|
(onlyVerified && !deviceKeys.verified));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue