From 3fb5fd7eb89811846bf558a1b6e941e1bc13d5b9 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 22 Jan 2023 19:07:02 +0100 Subject: [PATCH] style: Cleanup --- lib/src/omemo/omemomanager.dart | 3 +-- test/omemomanager_test.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/src/omemo/omemomanager.dart b/lib/src/omemo/omemomanager.dart index 1508e51..c4070d3 100644 --- a/lib/src/omemo/omemomanager.dart +++ b/lib/src/omemo/omemomanager.dart @@ -277,7 +277,6 @@ class OmemoManager { List? keyAndHmac; OmemoAuthenticatedMessage authMessage; OmemoMessage? message; - var ratchetCreated = false; // If the ratchet already existed, we store it. If it didn't, oldRatchet will stay // null. @@ -372,7 +371,7 @@ class OmemoManager { try { return _InternalDecryptionResult( - ratchetCreated, + false, false, await _decryptAndVerifyHmac(ciphertext, keyAndHmac), ); diff --git a/test/omemomanager_test.dart b/test/omemomanager_test.dart index 2c1bbd1..0424e78 100644 --- a/test/omemomanager_test.dart +++ b/test/omemomanager_test.dart @@ -1054,7 +1054,7 @@ void main() { // Bob responds final bobResult4 = await bobManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [aliceJid], "That's okay.", ), @@ -1182,7 +1182,7 @@ void main() { // Bob responds final bobResult4 = await bobManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [aliceJid], "That's okay.", ), @@ -1241,7 +1241,7 @@ void main() { // Alice sends Bob a message final aliceResult1 = await aliceManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [bobJid], 'Hello World!', ), @@ -1265,7 +1265,7 @@ void main() { // Alice immediately sends another message final aliceResult2 = await aliceManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [bobJid], 'Hello Bob', ), @@ -1301,7 +1301,7 @@ void main() { // Bob also sends a message final bobResult3 = await bobManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [aliceJid], 'Hello Alice!', ), @@ -1328,7 +1328,7 @@ void main() { // Alice replies final aliceResult4 = await aliceManager.onOutgoingStanza( - OmemoOutgoingStanza( + const OmemoOutgoingStanza( [bobJid], 'Hi Bob', ),