fix: minor stuff

This commit is contained in:
Reza 2022-11-23 19:28:08 +01:00
parent 44f862b966
commit 10cf979877
2 changed files with 6 additions and 5 deletions

View File

@ -639,9 +639,10 @@ class KeyVerification {
await client.sendToDevicesOfUserIds({userId}, type, payload);
} else {
final deviceKeys = client.userDeviceKeys[userId]?.deviceKeys;
deviceKeys?.removeWhere((key, value) =>
verifiedDevices.map((e) => e.deviceId).toList().contains(key) ==
false);
deviceKeys?.removeWhere((key, _) => !verifiedDevices
.map((device) => device.deviceId)
.toList()
.contains(key));
await client.sendToDeviceEncrypted(
deviceKeys!.values.toList(),
type,

View File

@ -70,7 +70,7 @@ class DeviceKeysList {
Future<KeyVerification> startVerification({
bool? newDirectChatEnableEncryption,
List<StateEvent>? newDirectChatInitialState,
List<Device>? verifiedDevice,
List<Device>? verifiedDevices,
}) async {
final encryption = client.encryption;
if (encryption == null) {
@ -98,7 +98,7 @@ class DeviceKeysList {
final request = KeyVerification(
encryption: encryption, userId: userId, deviceId: '*');
await request.start(
verifiedDevices: verifiedDevice,
verifiedDevices: verifiedDevices,
);
encryption.keyVerificationManager.addRequest(request);
return request;