diff options
author | James Cook <james@lindenlab.com> | 2010-06-01 08:35:29 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-06-01 08:35:29 -0700 |
commit | f9110055b97801249dfdad3e742539ded281b82f (patch) | |
tree | 64d91c1b02940d57edbcc4f8dea5ec3596415777 /indra/newview/llviewermessage.cpp | |
parent | 7d5e49ac619c9b3e5a00fbb4458f8c149658e194 (diff) | |
parent | 7666922593084fc741931662ba846284e39f6e9c (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 704f4b4902..182b216cbb 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2055,6 +2055,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) @@ -2817,7 +2827,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; @@ -2991,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() |