[Client] Add setting to ignore all private messages (#7260)

* [Client] Add setting to ignore all private messages (#1250)

* Early return

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-09-07 08:20:46 +02:00 committed by GitHub
parent fff506dbbe
commit 760fe88fa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 0 deletions

View file

@ -65,6 +65,11 @@ bool ChatSettings::getRoomHistory() const
return getValue("roomHistory", QString(), QString(), true).toBool();
}
bool ChatSettings::getIgnoreAllPrivateMessages() const
{
return getValue("ignoreAllPrivateMessages", QString(), QString(), false).toBool();
}
QString ChatSettings::getHighlightWords() const
{
return getValue("highlightWords").toString();
@ -131,6 +136,11 @@ void ChatSettings::setRoomHistory(bool _roomHistory)
setValue(_roomHistory, "roomHistory");
}
void ChatSettings::setIgnoreAllPrivateMessages(bool _ignoreAllPrivateMessages)
{
setValue(_ignoreAllPrivateMessages, "ignoreAllPrivateMessages");
}
void ChatSettings::setHighlightWords(const QString &_highlightWords)
{
setValue(_highlightWords, "highlightWords");

View file

@ -23,6 +23,7 @@ public:
[[nodiscard]] bool getShowMessagePopup() const override;
[[nodiscard]] bool getShowMentionPopup() const override;
[[nodiscard]] bool getRoomHistory() const override;
[[nodiscard]] bool getIgnoreAllPrivateMessages() const override;
[[nodiscard]] QString getHighlightWords() const override;
void setChatMention(bool _chatMention);
@ -37,6 +38,7 @@ public:
void setShowMessagePopups(bool _showMessagePopups);
void setShowMentionPopups(bool _showMentionPopups);
void setRoomHistory(bool _roomHistory);
void setIgnoreAllPrivateMessages(bool _ignoreAllPrivateMessages);
void setHighlightWords(const QString &_highlightWords);
signals: