mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:18:12 +00:00
IRCClient: Add NotifyOnMessage/NotifyOnMention config options
Allow IRCClient user to opt out of notifications.
This commit is contained in:
parent
070a8f2689
commit
63f8cbfb56
4 changed files with 17 additions and 1 deletions
|
@ -194,7 +194,8 @@ void IRCWindow::post_notification_if_needed(const String& name, const String& me
|
|||
auto notification = GUI::Notification::construct();
|
||||
|
||||
if (type() == Type::Channel) {
|
||||
|
||||
if (!m_client.notify_on_mention())
|
||||
return;
|
||||
if (!message.contains(m_client.nickname()))
|
||||
return;
|
||||
|
||||
|
@ -204,6 +205,8 @@ void IRCWindow::post_notification_if_needed(const String& name, const String& me
|
|||
builder.append(m_name);
|
||||
notification->set_title(builder.to_string());
|
||||
} else {
|
||||
if (!m_client.notify_on_message())
|
||||
return;
|
||||
notification->set_title(name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue