From f62fc8ab15a0dbb155e05ae023f6fae452d5582b Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 21 Jul 2014 23:11:03 -0400 Subject: [PATCH] Fix right clicking on lists of avatars and selecting ban/invite not working for nonfriends who aren't nearby. Also touch up group invite floater to show names we can't get from voavatars in the user's global namesystem preference. --- indra/newview/llpanelgroupbulk.cpp | 2 +- indra/newview/llpanelgroupinvite.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index 6e4a440da..c6e290963 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -397,7 +397,7 @@ void LLPanelGroupBulk::addUsers(uuid_vec_t& agent_ids) //looks like user try to invite offline friend //for offline avatar_id gObjectList.findObject() will return null //so we need to do this additional search in avatar tracker, see EXT-4732 - if (LLAvatarTracker::instance().isBuddy(agent_id)) + //if (LLAvatarTracker::instance().isBuddy(agent_id)) // Singu Note: We may be using this from another avatar list like group profile, disregard friendship status. { LLAvatarName av_name; if (!LLAvatarNameCache::get(agent_id, &av_name)) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index e49c3387f..5ae135380 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -461,7 +461,7 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) //looks like user try to invite offline friend //for offline avatar_id gObjectList.findObject() will return null //so we need to do this additional search in avatar tracker, see EXT-4732 - if (LLAvatarTracker::instance().isBuddy(agent_id)) + //if (LLAvatarTracker::instance().isBuddy(agent_id)) // Singu Note: We may be using this from another avatar list like group profile, disregard friendship status. { LLAvatarName av_name; if (!LLAvatarNameCache::get(agent_id, &av_name)) @@ -476,7 +476,9 @@ void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) } else { - names.push_back(av_name.getLegacyName()); + std::string name; + LLAvatarNameCache::getPNSName(av_name, name); + names.push_back(name); } } } @@ -489,7 +491,9 @@ void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& a std::vector names; uuid_vec_t agent_ids; agent_ids.push_back(id); - names.push_back(av_name.getLegacyName()); + std::string name; + LLAvatarNameCache::getPNSName(av_name, name); + names.push_back(name); mImplementation->addUsers(names, agent_ids); }