Inviting avatar to group via profile now adds that avatar to subsequent group invitation popup more reliably.
This commit is contained in:
@@ -392,27 +392,9 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
|
|||||||
std::vector<std::string> names;
|
std::vector<std::string> names;
|
||||||
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
for (S32 i = 0; i < (S32)agent_ids.size(); i++)
|
||||||
{
|
{
|
||||||
LLUUID agent_id = agent_ids[i];
|
std::string name;
|
||||||
LLVOAvatar* avatarp = gObjectList.findAvatar(agent_id);
|
if(gCacheName->getFullName(agent_ids[i], name))
|
||||||
if(avatarp)
|
names.push_back(name);
|
||||||
{
|
|
||||||
std::string fullname;
|
|
||||||
LLNameValue* nvfirst = avatarp->getNVPair("FirstName");
|
|
||||||
LLNameValue* nvlast = avatarp->getNVPair("LastName");
|
|
||||||
if(nvfirst && nvlast)
|
|
||||||
{
|
|
||||||
fullname = std::string(nvfirst->getString()) + " " + std::string(nvlast->getString());
|
|
||||||
}
|
|
||||||
if (!fullname.empty())
|
|
||||||
{
|
|
||||||
names.push_back(fullname);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
llwarns << "llPanelGroupInvite: Selected avatar has no name: " << avatarp->getID() << llendl;
|
|
||||||
names.push_back("(Unknown)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mImplementation->addUsers(names, agent_ids);
|
mImplementation->addUsers(names, agent_ids);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user