summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authormaxim@mnikolenko <maxim@mnikolenko>2013-01-03 13:38:42 +0200
committermaxim@mnikolenko <maxim@mnikolenko>2013-01-03 13:38:42 +0200
commitdf3f00443f6b4e0f6667f8d5b091af90d2bf340f (patch)
treeaaae5450c73deb45b4b428fd04565f899976a9ff /indra/newview/llimview.cpp
parent7e8d336749b42ce134a67dfe1f1990644f1b263a (diff)
parenta25e6eb733bb8f6a0e9f8de1094155f685c6216d (diff)
Merge
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 d736b81bb7..48cf7b3463 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -122,7 +122,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())
{
@@ -148,13 +148,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);
@@ -173,7 +174,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()
@@ -184,12 +185,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)
{
@@ -201,7 +196,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));
}