diff --git a/src/joinrulesevent.h b/src/joinrulesevent.h index e192d1055..cb09b3787 100644 --- a/src/joinrulesevent.h +++ b/src/joinrulesevent.h @@ -8,17 +8,25 @@ namespace Quotient { +#ifdef QUOTIENT_07 +class JoinRulesEvent : public StateEvent +#else class JoinRulesEvent : public StateEventBase +#endif { public: +#ifdef QUOTIENT_07 + QUO_EVENT(JoinRulesEvent, "m.room.join_rules") +#else DEFINE_EVENT_TYPEID("m.room.join_rules", JoinRulesEvent) +#endif - explicit JoinRulesEvent() - : StateEventBase(typeId(), matrixTypeId()) - { - } explicit JoinRulesEvent(const QJsonObject &obj) +#ifdef QUOTIENT_07 + : StateEvent(obj) +#else : StateEventBase(typeId(), obj) +#endif { } diff --git a/src/stickerevent.cpp b/src/stickerevent.cpp index bcc9ff2b3..6fd9591b5 100644 --- a/src/stickerevent.cpp +++ b/src/stickerevent.cpp @@ -6,7 +6,11 @@ using namespace Quotient; StickerEvent::StickerEvent(const QJsonObject &obj) +#ifdef QUOTIENT_07 + : RoomEvent(obj) +#else : RoomEvent(typeId(), obj) +#endif , m_imageContent(EventContent::ImageContent(obj["content"_ls].toObject())) { } diff --git a/src/stickerevent.h b/src/stickerevent.h index d35299af4..636aecedb 100644 --- a/src/stickerevent.h +++ b/src/stickerevent.h @@ -14,7 +14,11 @@ namespace Quotient class StickerEvent : public RoomEvent { public: +#ifdef QUOTIENT_07 + QUO_EVENT(StickerEvent, "m.sticker") +#else DEFINE_EVENT_TYPEID("m.sticker", StickerEvent) +#endif explicit StickerEvent(const QJsonObject &obj);