diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index a6647d88..a5bf3a4d 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -578,6 +578,12 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg) 2500); } } + if (this->args.isReceivedWhisper && + getSettings()->highlightSoundOnWhisper) { + if (!hasFocus || getSettings()->highlightAlwaysPlaySound) { + player->play(); + } + } } } diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 45b0d069..861a0aec 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -120,6 +120,8 @@ public: BoolSetting enableHighlightTaskbar = {"/highlighting/enableTaskbarFlashing", true}; BoolSetting customHighlightSound = {"/highlighting/useCustomSound", false}; + BoolSetting highlightSoundOnWhisper = { + "/highlighting/highlightSoundOnWhisper", false}; /// Logging BoolSetting enableLogging = {"/logging/enabled", false}; diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index be394b3c..626bb65d 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -149,6 +149,8 @@ HighlightingPage::HighlightingPage() layout.append(createCheckBox(ALWAYS_PLAY, getSettings()->highlightAlwaysPlaySound)); + layout.append(createCheckBox(("Notification on whisper"), + getSettings()->highlightSoundOnWhisper)); } // ---- misc