aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-24 18:22:43 +0200
committerGitHub <noreply@github.com>2022-09-24 18:22:43 +0200
commit62f9e5b7d1227a85f80ae49abcb555e4fe4c52f0 (patch)
tree09109cc2108884984e2039da9b74811149b931bf
parent8594f075d3e2fdfb2e4d5c9340167df569f3b53e (diff)
parent63d658e798c1ba29d080564db06a613a3d7d5df5 (diff)
downloadlibquotient-62f9e5b7d1227a85f80ae49abcb555e4fe4c52f0.tar.gz
libquotient-62f9e5b7d1227a85f80ae49abcb555e4fe4c52f0.zip
Merge #573: Fix verification
-rw-r--r--lib/connection.cpp3
-rw-r--r--lib/keyverificationsession.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 8ca76ceb..1048884f 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -1006,6 +1006,9 @@ bool Connection::Private::processIfVerificationEvent(const Event& evt,
emit q->newKeyVerificationSession(*sessionIter);
return true;
},
+ [](const KeyVerificationDoneEvent&) {
+ return true;
+ },
[this](const KeyVerificationEvent& kvEvt) {
if (auto* const session =
verificationSessions.value(kvEvt.transactionId())) {
diff --git a/lib/keyverificationsession.cpp b/lib/keyverificationsession.cpp
index 3f76eac1..f5d49561 100644
--- a/lib/keyverificationsession.cpp
+++ b/lib/keyverificationsession.cpp
@@ -120,7 +120,7 @@ void KeyVerificationSession::handleEvent(const KeyVerificationEvent& baseEvent)
return true;
},
[this](const KeyVerificationMacEvent& event) {
- if (state() != WAITINGFORMAC)
+ if (state() != WAITINGFORMAC && state() != WAITINGFORVERIFICATION)
return false;
handleMac(event);
return true;