From 5be933062b0e8dfe6955480b333450a32a444a33 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 28 May 2010 13:30:25 -0700 Subject: adding name lookup callback for friendship requested notification --- indra/newview/llviewermessage.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ead2e2457..cdcbe20a94 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2041,6 +2041,16 @@ static std::string clean_name_from_task_im(const std::string& msg) return msg; } +void notification_display_name_callback(const LLUUID& id, + const LLAvatarName& av_name, + const std::string& name, + LLSD& substitutions, + const LLSD& payload) +{ + substitutions["NAME"] = av_name.mDisplayName; + LLNotificationsUtil::add(name, substitutions, payload); +} + void process_improved_im(LLMessageSystem *msg, void **user_data) { if (gNoRender) @@ -2803,7 +2813,12 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) args["NAME"] = name; LLSD payload; payload["from_id"] = from_id; - LLNotificationsUtil::add("FriendshipAccepted", args, payload); + LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback, + _1, + _2, + "FriendshipAccepted", + args, + payload)); } break; -- cgit v1.2.3 From 7666922593084fc741931662ba846284e39f6e9c Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 1 Jun 2010 06:57:51 -0700 Subject: Clean up some comments --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index cca1415f9c..182b216cbb 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3006,7 +3006,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // IDEVO Correct for new-style "Resident" names if (chat.mSourceType == CHAT_SOURCE_AGENT) { - // JAMESDEBUG - I don't know if it's OK to change this here, if + // I don't know if it's OK to change this here, if // anything downstream does lookups by name, for instance LLAvatarName av_name; if (LLAvatarNameCache::useDisplayNames() -- cgit v1.2.3