diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index f42e01a4ad..333c679594 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -27,6 +27,9 @@ #include "llviewerprecompiledheaders.h" #include "fskeywords.h" +#include "llagent.h" +#include "llinstantmessage.h" +#include "llmutelist.h" #include "llui.h" #include "llviewercontrol.h" @@ -83,8 +86,16 @@ bool FSKeywords::chatContainsKeyword(const LLChat& chat, bool is_local) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground void FSKeywords::notify(const LLChat& chat) { - static LLCachedControl PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound"); - if(PlayModeUISndFSKeywordSound) - LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound"))); + if (chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) + { + if (!LLMuteList::getInstance()->isMuted(chat.mFromID)) + { + static LLCachedControl PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound"); + if (PlayModeUISndFSKeywordSound) + { + LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound"))); + } + } + } } // diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 276f5dd4bf..468422170c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2830,7 +2830,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = buffer; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -2926,7 +2926,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = message; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -3386,7 +3386,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mText = message; // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of Task IM) - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, true)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, true)) { FSKeywords::notify(chat); } @@ -3488,7 +3488,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = message; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -4607,7 +4607,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mOwnerID = owner_id; // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of local chat) - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, true)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, true)) { FSKeywords::notify(chat); }