diff options
Diffstat (limited to 'lib/events/encryptedevent.cpp')
-rw-r--r-- | lib/events/encryptedevent.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp index 6942738a..b5cedc69 100644 --- a/lib/events/encryptedevent.cpp +++ b/lib/events/encryptedevent.cpp @@ -1,28 +1,31 @@ #include "encryptedevent.h" + #include "room.h" -using namespace QMatrixClient; +using namespace Quotient; using namespace QtOlm; -EncryptedEvent::EncryptedEvent(const QJsonObject &ciphertext, const QString &senderKey) +EncryptedEvent::EncryptedEvent(const QJsonObject& ciphertext, + const QString& senderKey) : RoomEvent(typeId(), matrixTypeId(), - { { AlgorithmKeyL , OlmV1Curve25519AesSha2AlgoKey }, - { CiphertextKeyL , ciphertext }, - { SenderKeyKeyL, senderKey } - }) -{ } + { { AlgorithmKeyL, OlmV1Curve25519AesSha2AlgoKey }, + { CiphertextKeyL, ciphertext }, + { SenderKeyKeyL, senderKey } }) +{} -EncryptedEvent::EncryptedEvent(QByteArray ciphertext, const QString &senderKey, const QString& deviceId, const QString& sessionId) +EncryptedEvent::EncryptedEvent(QByteArray ciphertext, const QString& senderKey, + const QString& deviceId, const QString& sessionId) : RoomEvent(typeId(), matrixTypeId(), - { { AlgorithmKeyL , MegolmV1AesSha2AlgoKey }, - { CiphertextKeyL , QString(ciphertext) }, - { DeviceIdKeyL, deviceId }, - { SenderKeyKeyL, senderKey }, - { SessionIdKeyL, sessionId }, + { + { AlgorithmKeyL, MegolmV1AesSha2AlgoKey }, + { CiphertextKeyL, QString(ciphertext) }, + { DeviceIdKeyL, deviceId }, + { SenderKeyKeyL, senderKey }, + { SessionIdKeyL, sessionId }, }) -{ } +{} -EncryptedEvent::EncryptedEvent(const QJsonObject &obj) +EncryptedEvent::EncryptedEvent(const QJsonObject& obj) : RoomEvent(typeId(), obj) { qCDebug(EVENTS) << "Encrypted event" << id(); |