summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
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));
}