summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplayname.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-22 14:13:45 -0700
committerJames Cook <james@lindenlab.com>2010-04-22 14:13:45 -0700
commit98f5fc5ff006a82cacde47de0cbb564b6e703597 (patch)
tree13866bdd70c585c500fbe5c99699c48770ca4519 /indra/newview/llviewerdisplayname.cpp
parent61d79980d888a7bbac96df9955582f835b169a97 (diff)
DEV-47529 Turn off display names if no capability from simulator, and
Display name update broadcasts entire new name record to nearby viewers Display name update directly inserts new name into sim cache indra.xml has display_names_enabled setting to control cap Synchronized viewer and server versions of avatar name cache Reviewed with Ambroff
Diffstat (limited to 'indra/newview/llviewerdisplayname.cpp')
-rw-r--r--indra/newview/llviewerdisplayname.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp
index 1cfada48ad..8bed501c6e 100644
--- a/indra/newview/llviewerdisplayname.cpp
+++ b/indra/newview/llviewerdisplayname.cpp
@@ -120,20 +120,22 @@ class LLDisplayNameUpdate : public LLHTTPNode
{
LLSD body = input["body"];
LLUUID agent_id = body["agent_id"];
- std::string slid = body["sl_id"];
std::string old_display_name = body["old_display_name"];
- std::string new_display_name = body["new_display_name"];
+ // By convention this record is called "agent" in the People API
+ std::string name_data = body["agent"];
- // force re-request of this agent's name data
- LLAvatarNameCache::erase(agent_id);
+ // Inject the new name data into cache
+ LLAvatarName av_name;
+ av_name.fromLLSD( name_data );
+ LLAvatarNameCache::insert(agent_id, av_name);
// 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;
+ args["SLID"] = av_name.mSLID;
+ args["NEW_NAME"] = av_name.mDisplayName;
LLNotificationsUtil::add("DisplayNameUpdate", args);
}
};