aboutsummaryrefslogtreecommitdiff
path: root/lib/events/encryptedevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/encryptedevent.cpp')
-rw-r--r--lib/events/encryptedevent.cpp18
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)