DEV-47529 Chat "foo changed name to bar" on name change, viewer piece

Reviewed with Kelly
meow-7.2.2
James Cook 2010-04-13 10:47:58 -07:00
parent 1a7740f014
commit 60396971ca
2 changed files with 17 additions and 3 deletions

View File

@ -42,6 +42,7 @@
#include "llavatarnamecache.h"
#include "llhttpclient.h"
#include "llhttpnode.h"
#include "llnotificationsutil.h"
namespace LLViewerDisplayName
{
@ -124,15 +125,21 @@ class LLDisplayNameUpdate : public LLHTTPNode
{
LLSD body = input["body"];
LLUUID agent_id = body["agent_id"];
llinfos << "JAMESDEBUG LLDisplayNameUpdate agent_id "
<< agent_id << llendl;
std::string slid = body["sl_id"];
std::string old_display_name = body["old_display_name"];
std::string new_display_name = body["new_display_name"];
// force re-request of this agent's name data
LLAvatarNameCache::erase(agent_id);
// force name tag to update
LLVOAvatar::invalidateNameTag(agent_id);
LLSD args;
args["OLD_NAME"] = old_display_name;
args["SLID"] = slid;
args["NEW_NAME"] = new_display_name;
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
};

View File

@ -3074,6 +3074,13 @@ Change your display name?
Sorry, we could not set that display name. Please try a different name.
</notification>
<notification
icon="notifytip.tga"
name="DisplayNameUpdate"
type="notifytip">
[OLD_NAME] ([SLID]) is now known as [NEW_NAME].
</notification>
<notification
icon="alertmodal.tga"
name="OfferTeleport"