aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-01-01 13:35:52 +0100
committerGitHub <noreply@github.com>2022-01-01 13:35:52 +0100
commit527c3764bb9ec36aaab46b1ef4dfdd512828ff2c (patch)
tree7ad96dfeb263d97fb62fecb74664cf7115d6f3fd /lib/room.h
parent3150fd8efd1d39dbcb836a9d9dbf2bd139ff1418 (diff)
parent783d83012551df128d044382f6dd2047c5269700 (diff)
downloadlibquotient-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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/room.h b/lib/room.h
index 85c51a87..cbe3d1ad 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -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);