diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-15 22:08:09 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-16 10:42:10 +0200 |
commit | a3486fd0e9786c47564ce8173a2e4039135b10f9 (patch) | |
tree | 15a9eb75e4007b078b5e01bd57f3c2e50cbf4f0b /lib/connection.cpp | |
parent | 1fe8dc00de4d9bb7072ec9677ec7f8e73e4fc769 (diff) | |
download | libquotient-a3486fd0e9786c47564ce8173a2e4039135b10f9.tar.gz libquotient-a3486fd0e9786c47564ce8173a2e4039135b10f9.zip |
Simplify QOlmSession::matchesInboundSession*()
There's no particular use in letting `QOlmError` out, only to confirm
that, well, `QOlmError` is just another form of no-match.
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 511b64e2..955b5b1a 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -226,8 +226,7 @@ public: { Q_ASSERT(message.type() == QOlmMessage::PreKey); for(auto& session : olmSessions[senderKey]) { - const auto matches = session->matchesInboundSessionFrom(senderKey, message); - if(std::holds_alternative<bool>(matches) && std::get<bool>(matches)) { + if (session->matchesInboundSessionFrom(senderKey, message)) { qCDebug(E2EE) << "Found inbound session"; const auto result = session->decrypt(message); if(std::holds_alternative<QString>(result)) { |