diff options
author | Arnav Rawat <rawat.arnav@gmail.com> | 2021-05-25 14:01:51 -0500 |
---|---|---|
committer | Arnav Rawat <rawat.arnav@gmail.com> | 2021-05-25 14:17:23 -0500 |
commit | 17bf4d180297c7e87363e179b8afa79ddb15dca7 (patch) | |
tree | 040ebd91aba3ab61d62a572e0d16da344b2619b6 /lib/events | |
parent | 28823df2af5a4bfbab6dc455252c8ea0e211ffcb (diff) | |
download | libquotient-17bf4d180297c7e87363e179b8afa79ddb15dca7.tar.gz libquotient-17bf4d180297c7e87363e179b8afa79ddb15dca7.zip |
Fixes
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/simplestateevents.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h index f22f313d..c977cb6e 100644 --- a/lib/events/simplestateevents.h +++ b/lib/events/simplestateevents.h @@ -55,6 +55,7 @@ namespace EventContent { DEFINE_SIMPLE_STATE_EVENT(RoomNameEvent, "m.room.name", QString, name) DEFINE_SIMPLE_STATE_EVENT(RoomTopicEvent, "m.room.topic", QString, topic) +DEFINE_SIMPLE_STATE_EVENT(RoomPinnedEvent, "m.room.pinned_messages", QStringList, pinnedEvents) class RoomAliasesEvent : public StateEvent<EventContent::SimpleContent<QStringList>> { @@ -71,21 +72,4 @@ public: QStringList aliases() const { return content().value; } }; REGISTER_EVENT_TYPE(RoomAliasesEvent) - -class RoomPinnedEvent - : public StateEvent<EventContent::SimpleContent<QStringList>> -{ -public: - DEFINE_EVENT_TYPEID("m.room.pinned_messages", RoomPinnedEvent) - - explicit RoomPinnedEvent(const QJsonObject& json) - : StateEvent(typeId(), json, QStringLiteral("pinned")) - { } - explicit RoomPinnedEvent(const QStringList& roomEvents) - : StateEvent(typeId(), matrixTypeId(), {}, - QStringLiteral("pinned"), roomEvents) - { } - QStringList pinnedEvents() const { return content().value; } -}; -REGISTER_EVENT_TYPE(RoomPinnedEvent) } // namespace Quotient |