summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-28 13:30:25 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-28 13:30:25 -0700
commit5be933062b0e8dfe6955480b333450a32a444a33 (patch)
tree10a48e0b60debbc4163c802f9417ebdc030d09d7 /indra
parente395d78eb1a3127d122be6d113e7bbe3a26a0825 (diff)
adding name lookup callback for friendship requested notification
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewermessage.cpp17
1 files changed, 16 insertions, 1 deletions
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(&notification_display_name_callback,
+ _1,
+ _2,
+ "FriendshipAccepted",
+ args,
+ payload));
}
break;