diff options
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/simplestateevents.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h index d6261a8f..f22f313d 100644 --- a/lib/events/simplestateevents.h +++ b/lib/events/simplestateevents.h @@ -71,4 +71,21 @@ 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 |