aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-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,