summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 19:01:10 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-01-04 19:01:10 -0800
commit6153d09e52c5b41f69533cfe94af94d0f086c6ea (patch)
treede1695972eeea25718d38296577769ce49e09f23 /indra/newview/llimview.cpp
parent02ca16c1334d1409d8b14136f76305686796c359 (diff)
parent39ff545bab2c1e05b7b9fe14ee99828795f1f78f (diff)
merging in latest changes
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 716e6fe7ba..adc34cc9a4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -159,7 +159,7 @@ void on_new_message(const LLSD& msg)
LLUUID session_id = msg["session_id"].asUUID();
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
- // determine action for this session
+ // determine action for this session
if (session_id.isNull())
{
@@ -185,13 +185,14 @@ void on_new_message(const LLSD& msg)
action = gSavedSettings.getString("NotificationGroupChatOptions");
}
- // do not show notification in "do not disturb" mode or it goes from agent
+ // do not show notification which goes from agent
if (gAgent.getID() == participant_id)
{
return;
}
// execution of the action
+
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
@@ -210,7 +211,7 @@ void on_new_message(const LLSD& msg)
if ("toast" == action)
{
- // Skip toasting if we have open window of IM with this session id
+ // Skip toasting and flashing if we have open window of IM with this session id
if (session_floater
&& session_floater->isInVisibleChain()
&& session_floater->hasFocus()
@@ -221,12 +222,6 @@ void on_new_message(const LLSD& msg)
return;
}
- // Skip toasting for system messages and for nearby chat
- if (participant_id.isNull())
- {
- return;
- }
-
//User is not focused on conversation containing the message
if(session_floater_not_focused)
{
@@ -238,7 +233,8 @@ void on_new_message(const LLSD& msg)
gToolBarView->flashCommand(LLCommandId("chat"), true);
//Show IM toasts (upper right toasts)
- if(session_id.notNull())
+ // Skip toasting for system messages and for nearby chat
+ if(session_id.notNull() && participant_id.notNull())
{
LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
}