fix: minor stuff
This commit is contained in:
parent
f969a733f1
commit
7da56ee212
|
|
@ -611,7 +611,6 @@ class KeyVerification {
|
||||||
String type,
|
String type,
|
||||||
Map<String, dynamic> payload,
|
Map<String, dynamic> payload,
|
||||||
) async {
|
) async {
|
||||||
Logs().e('payload is ', payload);
|
|
||||||
makePayload(payload);
|
makePayload(payload);
|
||||||
Logs().i('[Key Verification] Sending type $type: $payload');
|
Logs().i('[Key Verification] Sending type $type: $payload');
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
|
@ -635,12 +634,13 @@ class KeyVerification {
|
||||||
EventTypes.KeyVerificationRequest,
|
EventTypes.KeyVerificationRequest,
|
||||||
EventTypes.KeyVerificationCancel,
|
EventTypes.KeyVerificationCancel,
|
||||||
}.contains(type)) {
|
}.contains(type)) {
|
||||||
final deviceKeys = client.userDeviceKeys[userId]?.deviceKeys;
|
final deviceKeys = client.userDeviceKeys[userId]?.deviceKeys.values
|
||||||
deviceKeys?.removeWhere((_, value) =>
|
.where((deviceKey) => deviceKey.hasValidSignatureChain(
|
||||||
!value.hasValidSignatureChain(verifiedByTheirMasterKey: true));
|
verifiedByTheirMasterKey: true));
|
||||||
|
|
||||||
if (deviceKeys != null) {
|
if (deviceKeys != null) {
|
||||||
await client.sendToDeviceEncrypted(
|
await client.sendToDeviceEncrypted(
|
||||||
deviceKeys.values.toList(),
|
deviceKeys.toList(),
|
||||||
type,
|
type,
|
||||||
payload,
|
payload,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue