summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-28 13:30:55 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-28 13:30:55 -0700
commit66fe983cb22a7916d46e2df087ce3aade345cdc8 (patch)
treef8e121709c3e243b0b749b7a24baa540f1ec1798 /indra/newview/llviewermessage.cpp
parent5be933062b0e8dfe6955480b333450a32a444a33 (diff)
parentb944a4792762bf61b7837a29c8580c9823c9670b (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index cdcbe20a94..cca1415f9c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -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;
}
@@ -2603,7 +2617,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;