From 08bbb3f6f5c7c08dd28ec093a2c7adb81f652717 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 29 Sep 2021 15:59:19 +0200 Subject: [PATCH] fix: prefer ! over ? --- lib/encryption/utils/key_verification.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/encryption/utils/key_verification.dart b/lib/encryption/utils/key_verification.dart index 57f5f1f8..bfa375ee 100644 --- a/lib/encryption/utils/key_verification.dart +++ b/lib/encryption/utils/key_verification.dart @@ -261,7 +261,7 @@ class KeyVerification { transactionId ??= eventId ?? payload['transaction_id']; if (method != null) { // the other side sent us a start, even though we already sent one - if (payload['method'] == method?.type) { + if (payload['method'] == method!.type) { // same method. Determine priority final ourEntry = '${client.userID}|${client.deviceID}'; final entries = [ourEntry, '$userId|$deviceId']; @@ -274,7 +274,7 @@ class KeyVerification { startedVerification = false; // it is now as if they started thisLastStep = lastStep = EventTypes.KeyVerificationRequest; // we fake the last step - method?.dispose(); // in case anything got created already + method!.dispose(); // in case anything got created already } } else { // methods don't match up, let's cancel this