diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-26 13:46:58 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-26 13:46:58 +0100 |
commit | f4a0acf818c4c89d132b2ec96d47c5817b106149 (patch) | |
tree | a76625dce0ce620a1a54f5a76978da3d290bfd0b /lib/events/encryptedevent.cpp | |
parent | f6155d62740a88b020273ba623c816f7b9805772 (diff) | |
download | libquotient-f4a0acf818c4c89d132b2ec96d47c5817b106149.tar.gz libquotient-f4a0acf818c4c89d132b2ec96d47c5817b106149.zip |
Drop #include "logging.h" from event.h
Makes compilation a tad lighter.
Diffstat (limited to 'lib/events/encryptedevent.cpp')
-rw-r--r-- | lib/events/encryptedevent.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp index 0290f973..ebf733ac 100644 --- a/lib/events/encryptedevent.cpp +++ b/lib/events/encryptedevent.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LGPL-2.1-or-later #include "encryptedevent.h" +#include "logging.h" using namespace Quotient; @@ -25,8 +26,12 @@ EncryptedEvent::EncryptedEvent(QByteArray ciphertext, const QString& senderKey, }) {} -EncryptedEvent::EncryptedEvent(const QJsonObject& obj) - : RoomEvent(typeId(), obj) +QString EncryptedEvent::algorithm() const { - qCDebug(E2EE) << "Encrypted event from" << senderId(); + const auto algo = content<QString>(AlgorithmKeyL); + if (!SupportedAlgorithms.contains(algo)) { + qCWarning(MAIN) << "The EncryptedEvent's algorithm" << algo + << "is not supported"; + } + return algo; } |