Add new message action to pin and unpin messages in rooms

Self-explanatory, now you can manage pinned messages in NeoChat alone.
This commit is contained in:
Joshua Goins
2025-02-21 18:11:20 -05:00
parent 9811c0d97a
commit 2861eb9c60
5 changed files with 48 additions and 0 deletions

View File

@@ -601,6 +601,23 @@ public:
*/
Q_INVOKABLE ThreadModel *modelForThread(const QString &threadRootId);
/**
* @brief Pin a message in the room.
* @param eventId The id of the event to pin.
*/
Q_INVOKABLE void pinEvent(const QString &eventId);
/**
* @brief Unpin a message in the room.
* @param eventId The id of the event to unpin.
*/
Q_INVOKABLE void unpinEvent(const QString &eventId);
/**
* @return True if @p eventId is pinned in the room.
*/
Q_INVOKABLE bool isEventPinned(const QString &eventId) const;
private:
bool m_visible = false;