aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomkeyevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/roomkeyevent.h')
-rw-r--r--lib/events/roomkeyevent.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/events/roomkeyevent.h b/lib/events/roomkeyevent.h
index 6883a2a5..dad5df8b 100644
--- a/lib/events/roomkeyevent.h
+++ b/lib/events/roomkeyevent.h
@@ -11,9 +11,16 @@ class QUOTIENT_API RoomKeyEvent : public Event
public:
QUO_EVENT(RoomKeyEvent, "m.room_key")
- explicit RoomKeyEvent(const QJsonObject& obj);
+ using Event::Event;
explicit RoomKeyEvent(const QString& algorithm, const QString& roomId,
- const QString& sessionId, const QString& sessionKey);
+ const QString& sessionId, const QString& sessionKey)
+ : Event(basicJson(TypeId, {
+ { "algorithm", algorithm },
+ { "room_id", roomId },
+ { "session_id", sessionId },
+ { "session_key", sessionKey },
+ }))
+ {}
QUO_CONTENT_GETTER(QString, algorithm)
QUO_CONTENT_GETTER(QString, roomId)