diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-24 15:52:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-24 15:52:06 +0200 |
commit | 8594f075d3e2fdfb2e4d5c9340167df569f3b53e (patch) | |
tree | ab033fd10bbcb23798aa21d38bf164992944cd36 | |
parent | 4cf39fa778e2d850586d37bfc3357a6bc5042227 (diff) | |
parent | 4146f33bda60d04db34fbd5614439b22b5d5837f (diff) | |
download | libquotient-8594f075d3e2fdfb2e4d5c9340167df569f3b53e.tar.gz libquotient-8594f075d3e2fdfb2e4d5c9340167df569f3b53e.zip |
Merge #572: Fix construction of EncryptedEvents
-rw-r--r-- | lib/events/encryptedevent.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp index 94b44901..49df25c8 100644 --- a/lib/events/encryptedevent.cpp +++ b/lib/events/encryptedevent.cpp @@ -8,21 +8,19 @@ using namespace Quotient; EncryptedEvent::EncryptedEvent(const QJsonObject& ciphertexts, const QString& senderKey) - : RoomEvent({ { AlgorithmKeyL, OlmV1Curve25519AesSha2AlgoKey }, - { CiphertextKeyL, ciphertexts }, - { SenderKeyKeyL, senderKey } }) + : RoomEvent(basicJson(TypeId, { { AlgorithmKeyL, OlmV1Curve25519AesSha2AlgoKey }, + { CiphertextKeyL, ciphertexts }, + { SenderKeyKeyL, senderKey } })) {} EncryptedEvent::EncryptedEvent(const QByteArray& ciphertext, const QString& senderKey, const QString& deviceId, const QString& sessionId) - : RoomEvent({ - { AlgorithmKeyL, MegolmV1AesSha2AlgoKey }, - { CiphertextKeyL, QString(ciphertext) }, - { DeviceIdKeyL, deviceId }, - { SenderKeyKeyL, senderKey }, - { SessionIdKeyL, sessionId }, - }) + : RoomEvent(basicJson(TypeId, { { AlgorithmKeyL, MegolmV1AesSha2AlgoKey }, + { CiphertextKeyL, QString(ciphertext) }, + { DeviceIdKeyL, deviceId }, + { SenderKeyKeyL, senderKey }, + { SessionIdKeyL, sessionId } })) {} EncryptedEvent::EncryptedEvent(const QJsonObject& obj) |