aboutsummaryrefslogtreecommitdiff
path: root/events/event.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-09-26 20:57:28 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-02 08:20:40 +0900
commit79f52e3f6142afd48d30b842618ef0867072443b (patch)
tree5fb2699ed7d3ee449a6a2b6a754e810de962abcf /events/event.cpp
parentfaa395c5e3b148217073dc9d2953084d68d685bd (diff)
downloadlibquotient-79f52e3f6142afd48d30b842618ef0867072443b.tar.gz
libquotient-79f52e3f6142afd48d30b842618ef0867072443b.zip
Introduce EncryptionEvent class
This allows to detect if a room has been encrypted (no room state, just an event as of yet). Closes #84.
Diffstat (limited to 'events/event.cpp')
-rw-r--r--events/event.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/events/event.cpp b/events/event.cpp
index d718306d..304f2af6 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -26,7 +26,7 @@
#include "roomtopicevent.h"
#include "typingevent.h"
#include "receiptevent.h"
-#include "unknownevent.h"
+#include "encryptedevent.h"
#include "logging.h"
#include <QtCore/QJsonDocument>
@@ -136,6 +136,7 @@ RoomEvent* RoomEvent::fromJson(const QJsonObject& obj)
"m.room.canonical_alias", make<RoomCanonicalAliasEvent>,
"m.room.member", make<RoomMemberEvent>,
"m.room.topic", make<RoomTopicEvent>,
+ "m.room.encryption", make<EncryptionEvent>,
/* Insert new ROOM event types BEFORE this line */
nullptr
);