aboutsummaryrefslogtreecommitdiff
path: root/events/event.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-05 10:16:20 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-05 16:14:43 +0900
commit6ea1fb621488910de055bd3af4d00343a763541a (patch)
treee371dc72e16329623f5468eaf85ac394030f1a52 /events/event.cpp
parent9057fc02b06bdd3e38e9cf39e68287e02d58596b (diff)
downloadlibquotient-6ea1fb621488910de055bd3af4d00343a763541a.tar.gz
libquotient-6ea1fb621488910de055bd3af4d00343a763541a.zip
ReadMarkerEvent; TagEvent remade with less boilerplate code
tagevent.h -> accountdataevents.h now has a macro to define more simplistic events along the lines of simplestateevents.h but inheriting from Event instead. TagEvent and ReadMarkerEvent(m.fully_read) are defined using this macro. ReadMarkerEvent is also wired through event.* (but not further yet).
Diffstat (limited to 'events/event.cpp')
-rw-r--r--events/event.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/events/event.cpp b/events/event.cpp
index 74a2c3d7..f3e965e2 100644
--- a/events/event.cpp
+++ b/events/event.cpp
@@ -24,7 +24,7 @@
#include "roomavatarevent.h"
#include "typingevent.h"
#include "receiptevent.h"
-#include "tagevent.h"
+#include "accountdataevents.h"
#include "redactionevent.h"
#include "logging.h"
@@ -88,7 +88,8 @@ EventPtr _impl::doMakeEvent<Event>(const QJsonObject& obj)
return EventPtr(move(e));
return EventPtr { makeIfMatches<Event,
- TypingEvent, ReceiptEvent, TagEvent>(obj, obj["type"].toString()) };
+ TypingEvent, ReceiptEvent, TagEvent, ReadMarkerEvent>(
+ obj, obj["type"].toString()) };
}
RoomEvent::RoomEvent(Event::Type type) : Event(type) { }