diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-05-20 14:56:10 -0400 |
commit | 6f5313caea9bb8458dca23bbaf4f10cd6641c7fb (patch) | |
tree | ac34191250860e5f250cf1cc2e9199cdaa8204f6 /indra/newview/llviewermessage.cpp | |
parent | eb8221338e0276b9afe8d92738166f97782d48d6 (diff) | |
parent | 0b612741d53a044a0179e1c32018bf8cd4213631 (diff) |
automated merge mesh-development -> davep-mesh-candidate-2010
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9c13a96b81..86b56df556 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -344,6 +344,11 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegion(mesgsys->getSender()); + if(!regionp) + { + llwarns << "Invalid region for layer data." << llendl; + return; + } S32 size; S8 type; @@ -2208,7 +2213,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) name = clean_name_from_im(name, dialog); BOOL is_busy = gAgent.getBusy(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat); + BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) + // object IMs contain sender object id in session_id (STORM-1209) + || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id); BOOL is_linden = LLMuteList::getInstance()->isLinden(name); BOOL is_owned_by_me = FALSE; BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; @@ -2596,6 +2603,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();; LLSD payload; payload["from_id"] = from_id; + // Passing the "SESSION_NAME" to use it for IM notification logging + // in LLTipHandler::processNotification(). See STORM-941. + payload["SESSION_NAME"] = name; LLNotificationsUtil::add("InventoryAccepted", args, payload); break; } @@ -5366,6 +5376,12 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) { // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; + msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
+ if (!LLNotifications::getInstance()->templateExists(notificationID))
+ {
+ return false;
+ } + std::string llsdRaw; LLSD llsdBlock; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); @@ -5522,14 +5538,19 @@ void process_alert_core(const std::string& message, BOOL modal) } else { - LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + // Hack fix for EXP-623 (blame fix on RN :)) to avoid a sim deploy + const std::string AUTOPILOT_CANCELED_MSG("Autopilot canceled"); + if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos ) + { + LLSD args; + std::string new_msg =LLNotifications::instance().getGlobalString(message); - std::string localized_msg; - bool is_message_localized = LLTrans::findString(localized_msg, new_msg); + std::string localized_msg; + bool is_message_localized = LLTrans::findString(localized_msg, new_msg); - args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; - LLNotificationsUtil::add("SystemMessageTip", args); + args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; + LLNotificationsUtil::add("SystemMessageTip", args); + } } } |