summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-04-26 14:02:41 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-04-26 14:02:41 -0700
commitd952f97459a04d64b698380b777406f1644f9bb2 (patch)
treeb17a77d0374fa3d701e0b077589d4bfd0742ee5e
parent36f8899861b4f6ad75485cc26e7493689aa53acc (diff)
EXP-752 FIX -- When "View Display Names" is disabled, only my own profile loads, when I click others profiles
Avatar username is now looked up in the name cache when it is blank, which happens when display names are turned off apparently. Reviewed by Fredrik.
-rw-r--r--indra/newview/llavataractions.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index ca7ec7cc30..cbbdcb2983 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -302,8 +302,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
{
- llinfos << "opening web profile for " << av_name.mUsername << llendl;
- std::string url = getProfileURL(av_name.mUsername);
+ std::string username = av_name.mUsername;
+ if (username.empty())
+ {
+ username = LLCacheName::buildUsername(av_name.mDisplayName);
+ }
+
+ llinfos << "opening web profile for " << username << llendl;
+ std::string url = getProfileURL(username);
// PROFILES: open in webkit window
LLWeb::loadWebURLInternal(url, "", agent_id.asString());