diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index a6647d88e..a5bf3a4d2 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 45b0d069a..861a0aec0 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 be394b3c2..626bb65d0 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