aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/encryptedevent.cpp7
-rw-r--r--lib/events/encryptedevent.h7
-rw-r--r--lib/events/event.h2
-rw-r--r--lib/events/roommessageevent.cpp5
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp
index e9b4a585..94b44901 100644
--- a/lib/events/encryptedevent.cpp
+++ b/lib/events/encryptedevent.cpp
@@ -6,14 +6,15 @@
using namespace Quotient;
-EncryptedEvent::EncryptedEvent(const QJsonObject& ciphertext,
+EncryptedEvent::EncryptedEvent(const QJsonObject& ciphertexts,
const QString& senderKey)
: RoomEvent({ { AlgorithmKeyL, OlmV1Curve25519AesSha2AlgoKey },
- { CiphertextKeyL, ciphertext },
+ { CiphertextKeyL, ciphertexts },
{ SenderKeyKeyL, senderKey } })
{}
-EncryptedEvent::EncryptedEvent(QByteArray ciphertext, const QString& senderKey,
+EncryptedEvent::EncryptedEvent(const QByteArray& ciphertext,
+ const QString& senderKey,
const QString& deviceId, const QString& sessionId)
: RoomEvent({
{ AlgorithmKeyL, MegolmV1AesSha2AlgoKey },
diff --git a/lib/events/encryptedevent.h b/lib/events/encryptedevent.h
index 22e51cb8..02d4c7aa 100644
--- a/lib/events/encryptedevent.h
+++ b/lib/events/encryptedevent.h
@@ -32,11 +32,12 @@ public:
/* In case with Olm, the encrypted content of the event is
* a map from the recipient Curve25519 identity key to ciphertext
* information */
- explicit EncryptedEvent(const QJsonObject& ciphertext,
+ explicit EncryptedEvent(const QJsonObject& ciphertexts,
const QString& senderKey);
/* In case with Megolm, device_id and session_id are required */
- explicit EncryptedEvent(QByteArray ciphertext, const QString& senderKey,
- const QString& deviceId, const QString& sessionId);
+ explicit EncryptedEvent(const QByteArray& ciphertext,
+ const QString& senderKey, const QString& deviceId,
+ const QString& sessionId);
explicit EncryptedEvent(const QJsonObject& obj);
QString algorithm() const;
diff --git a/lib/events/event.h b/lib/events/event.h
index 4b715813..ea5a2554 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -269,7 +269,7 @@ public:
explicit Event(const QJsonObject& json);
Q_DISABLE_COPY(Event)
- Event(Event&&) = default;
+ Event(Event&&) noexcept = default;
Event& operator=(Event&&) = delete;
virtual ~Event();
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp
index db5afaf1..df4840b3 100644
--- a/lib/events/roommessageevent.cpp
+++ b/lib/events/roommessageevent.cpp
@@ -128,9 +128,8 @@ QJsonObject RoomMessageEvent::assembleContentJson(const QString& plainBody,
RoomMessageEvent::RoomMessageEvent(const QString& plainBody,
const QString& jsonMsgType,
TypedBase* content)
- : RoomEvent(RoomEvent::basicJson(TypeId,
- assembleContentJson(plainBody, jsonMsgType,
- content)))
+ : RoomEvent(
+ basicJson(TypeId, assembleContentJson(plainBody, jsonMsgType, content)))
, _content(content)
{}