FIRE-13454: Blocked Residents in local chat still trigger keyword alerts
parent
c29ebc7d15
commit
cc68624ccd
|
|
@ -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)
|
|||
// <FS:PP> 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<bool> 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<bool> PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound");
|
||||
if (PlayModeUISndFSKeywordSound)
|
||||
{
|
||||
LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// </FS:PP>
|
||||
|
|
|
|||
|
|
@ -2830,7 +2830,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
|
||||
// <FS:PP> 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)
|
|||
|
||||
// <FS:PP> 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;
|
||||
|
||||
// <FS:PP> 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)
|
|||
|
||||
// <FS:PP> 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;
|
||||
|
||||
// <FS:PP> 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue