DEV-50013 Object returned to lost and found uses display names

meow-7.2.2
James Cook 2010-05-27 18:29:21 -07:00
parent b999b6cc82
commit 0a5ec5da9c
1 changed files with 17 additions and 3 deletions

View File

@ -2024,7 +2024,8 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t
}
}
static std::string clean_name_from_task_im(const std::string& msg)
static std::string clean_name_from_task_im(const std::string& msg,
BOOL from_group)
{
boost::smatch match;
static const boost::regex returned_exp(
@ -2034,7 +2035,20 @@ static std::string clean_name_from_task_im(const std::string& msg)
// match objects are 1-based for groups
std::string final = match[1].str();
std::string name = match[2].str();
final += LLCacheName::cleanFullName(name);
// Don't try to clean up group names
if (!from_group)
{
if (LLAvatarNameCache::useDisplayNames())
{
// ...just convert to username
final += LLCacheName::buildUsername(name);
}
else
{
// ...strip out legacy "Resident" name
final += LLCacheName::cleanFullName(name);
}
}
final += match[3].str();
return final;
}
@ -2593,7 +2607,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
// IDEVO Some messages have embedded resident names
message = clean_name_from_task_im(message);
message = clean_name_from_task_im(message, from_group);
LLSD query_string;
query_string["owner"] = from_id;