summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-02 16:31:05 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-02 16:31:05 -0700
commit0789897d6127637f2b5f99d8e107fbd3df577173 (patch)
tree79cf699b968cf063e0bbcfa10ad280ef2fae0430 /indra/newview
parenta282ffedf444462b71f5abc7aeac47768e7344e7 (diff)
removed "SESSION_NAME" in favor of doing a gCacheName lookup
reviewed by James
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavataractions.cpp1
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp25
-rw-r--r--indra/newview/llviewermessage.cpp3
3 files changed, 13 insertions, 16 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 6699449625..d1ed4922f4 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -719,7 +719,6 @@ void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::stri
LLSD payload;
payload["from_id"] = target_id;
- payload["SESSION_NAME"] = target_name;
payload["SUPPRESS_TOAST"] = true;
LLNotificationsUtil::add("FriendshipOffered", args, payload);
}
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 2ca2df152b..deb0cb6cfa 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -321,34 +321,35 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification)
logToIMP2P(notification, false);
}
+void log_name_callback(const std::string& full_name, const std::string& from_name,
+ const std::string& message, const LLUUID& from_id)
+
+{
+ LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, full_name, from_name, message,
+ from_id, LLUUID());
+}
+
// static
void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only)
{
- const std::string name = LLHandlerUtil::getSubstitutionName(notification);
-
- const std::string& session_name = notification->getPayload().has(
- "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name;
-
// don't create IM p2p session with objects, it's necessary condition to log
if (notification->getName() != OBJECT_GIVE_ITEM)
{
LLUUID from_id = notification->getPayload()["from_id"];
- //there still appears a log history file with weird name " .txt"
- if (" " == session_name || "{waiting}" == session_name || "{nobody}" == session_name)
+ if (from_id.isNull())
{
- llwarning("Weird session name (" + session_name + ") for notification " + notification->getName(), 666)
+ llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
+ return;
}
if(to_file_only)
{
- logToIM(IM_NOTHING_SPECIAL, session_name, "", notification->getMessage(),
- LLUUID(), LLUUID());
+ gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID()));
}
else
{
- logToIM(IM_NOTHING_SPECIAL, session_name, INTERACTIVE_SYSTEM_FROM, notification->getMessage(),
- from_id, LLUUID());
+ gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id));
}
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e4b04b5d4f..86865343a8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1909,7 +1909,6 @@ protected:
void modifyNotificationParams()
{
LLSD payload = mParams.payload;
- payload["SESSION_NAME"] = mName;
mParams.payload = payload;
}
};
@@ -2142,7 +2141,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_CONSOLE_AND_CHAT_HISTORY:
// *TODO: Translate
args["MESSAGE"] = message;
- payload["SESSION_NAME"] = name;
payload["from_id"] = from_id;
LLNotificationsUtil::add("IMSystemMessageTip",args, payload);
break;
@@ -6096,7 +6094,6 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
//*TODO please rewrite all keys to the same case, lower or upper
payload["from_id"] = target_id;
- payload["SESSION_NAME"] = target_name;
payload["SUPPRESS_TOAST"] = true;
LLNotificationsUtil::add("TeleportOfferSent", args, payload);
}