diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-01-01 13:35:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-01 13:35:52 +0100 |
commit | 527c3764bb9ec36aaab46b1ef4dfdd512828ff2c (patch) | |
tree | 7ad96dfeb263d97fb62fecb74664cf7115d6f3fd /lib/room.h | |
parent | 3150fd8efd1d39dbcb836a9d9dbf2bd139ff1418 (diff) | |
parent | 783d83012551df128d044382f6dd2047c5269700 (diff) | |
download | libquotient-527c3764bb9ec36aaab46b1ef4dfdd512828ff2c.tar.gz libquotient-527c3764bb9ec36aaab46b1ef4dfdd512828ff2c.zip |
Merge pull request #458 from arawaaa/pinned
Pinned message support
Diffstat (limited to 'lib/room.h')
-rw-r--r-- | lib/room.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -124,6 +124,8 @@ class Room : public QObject { Q_PROPERTY(QStringList altAliases READ altAliases NOTIFY namesChanged) Q_PROPERTY(QString canonicalAlias READ canonicalAlias NOTIFY namesChanged) Q_PROPERTY(QString displayName READ displayName NOTIFY displaynameChanged) + Q_PROPERTY(QStringList pinnedEventIds READ pinnedEventIds WRITE setPinnedEvents + NOTIFY pinnedEventsChanged) Q_PROPERTY(QString displayNameForHtml READ displayNameForHtml NOTIFY displaynameChanged) Q_PROPERTY(QString topic READ topic NOTIFY topicChanged) Q_PROPERTY(QString avatarMediaId READ avatarMediaId NOTIFY avatarChanged @@ -253,6 +255,9 @@ public: //! Get a list of both canonical and alternative aliases QStringList aliases() const; QString displayName() const; + QStringList pinnedEventIds() const; + // Returns events available locally, use pinnedEventIds() for full list + QVector<const RoomEvent*> pinnedEvents() const; QString displayNameForHtml() const; QString topic() const; QString avatarMediaId() const; @@ -832,6 +837,7 @@ public Q_SLOTS: SetRoomStateWithKeyJob* setState(const StateEventBase& evt) const; void setName(const QString& newName); void setCanonicalAlias(const QString& newAlias); + void setPinnedEvents(const QStringList& events); /// Set room aliases on the user's current server void setLocalAliases(const QStringList& aliases); void setTopic(const QString& newTopic); @@ -938,6 +944,7 @@ Q_SIGNALS: void namesChanged(Quotient::Room* room); void displaynameAboutToChange(Quotient::Room* room); void displaynameChanged(Quotient::Room* room, QString oldName); + void pinnedEventsChanged(); void topicChanged(); void avatarChanged(); void userAdded(Quotient::User* user); |