summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexanderP ProductEngine <apaschenko@productengine.com>2012-11-23 15:14:17 +0200
committerAlexanderP ProductEngine <apaschenko@productengine.com>2012-11-23 15:14:17 +0200
commit890965faf5baa5f6f832e086991d59bb8d33b7bc (patch)
tree128ed56740ae9828bc282e22489766c615e44f42 /indra
parent2ce98c8b14d86bb5c8078c762bfc32b6fc4d8346 (diff)
CHUI-528, CHUI-536, CHUI-538, CHUI-540 ADD. FIX (Built single processor of different types of notifications): clean up code
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimview.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 5aceb6c66b..db52a50aa1 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -118,17 +118,18 @@ void on_new_message(const LLSD& msg)
{
std::string action;
LLUUID participant_id = msg["from_id"].asUUID();
- LLUUID session_id = msg["session_id"];
+ LLUUID session_id = msg["session_id"].asUUID();
LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
// determine action for this session
+
if (session_id.isNull())
{
action = gSavedSettings.getString("NotificationNearbyChatOptions");
}
else if(session->isP2PSessionType())
{
- if (LLAvatarTracker::instance().isBuddy(msg["from_id"].asUUID()))
+ if (LLAvatarTracker::instance().isBuddy(participant_id))
{
action = gSavedSettings.getString("NotificationFriendIMOptions");
}
@@ -152,10 +153,12 @@ void on_new_message(const LLSD& msg)
return;
}
+ // execution of the action
+
if ("toast" == action)
{
// Skip toasting if we have open window of IM with this session id
- LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(msg["session_id"]);
+ LLFloaterIMSession* open_im_floater = LLFloaterIMSession::findInstance(session_id);
if (
open_im_floater
&& open_im_floater->isInVisibleChain()