aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomevent.h
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-03-10 21:19:49 +0100
committerTobias Fella <fella@posteo.de>2022-03-10 21:41:11 +0100
commit71eed90fdea8689d237da8de1bf385202b85cffd (patch)
treee267e137e09c5d0461c7e95e90a98b4c5ac36f0d /lib/events/roomevent.h
parent7ba17e2b9b6d76aeea250f37c833ad7eed2f61da (diff)
downloadlibquotient-71eed90fdea8689d237da8de1bf385202b85cffd.tar.gz
libquotient-71eed90fdea8689d237da8de1bf385202b85cffd.zip
More work; Update olm pickle & timestamps in database; Remove TODOs
Diffstat (limited to 'lib/events/roomevent.h')
-rw-r--r--lib/events/roomevent.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index c4b0131a..a7d6c428 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -80,6 +80,14 @@ using RoomEventPtr = event_ptr_tt<RoomEvent>;
using RoomEvents = EventsArray<RoomEvent>;
using RoomEventsRange = Range<RoomEvents>;
+template <>
+inline EventPtr doLoadEvent(const QJsonObject& json, const QString& matrixType)
+{
+ if (matrixType == "m.room.encrypted")
+ return RoomEvent::factory.loadEvent(json, matrixType);
+ return Event::factory.loadEvent(json, matrixType);
+}
+
class QUOTIENT_API CallEventBase : public RoomEvent {
public:
CallEventBase(Type type, event_mtype_t matrixType, const QString& callId,