summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorChuck Linden <chuck@lindenlab.com>2010-02-15 18:20:02 -0500
committerChuck Linden <chuck@lindenlab.com>2010-02-15 18:20:02 -0500
commit852bd5ef24240940991574afd2a35e4e857dbac5 (patch)
treed01d101619346e4a8a28056623e886257168531b /indra/newview/llchathistory.cpp
parentd6027f543269610e72fc1ab1876e71a434b3461c (diff)
parented116da1311b281bcd815d9d3f95c1aecf67207d (diff)
Automated merge with file:///Users/chuck/Documents/hg/viewer-hotfix
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 9368d9cb7c..81cc52528c 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -68,6 +68,9 @@ const static std::string NEW_LINE(rawstr_to_utf8("\n"));
const static U32 LENGTH_OF_TIME_STR = std::string("12:00").length();
+const static std::string SLURL_APP_AGENT = "secondlife:///app/agent/";
+const static std::string SLURL_ABOUT = "/about";
+
// support for secondlife:///app/objectim/{UUID}/ SLapps
class LLObjectIMHandler : public LLCommandHandler
{
@@ -779,6 +782,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
else
{
std::string message = irc_me ? chat.mText.substr(3) : chat.mText;
+
+
+ //MESSAGE TEXT PROCESSING
+ //*HACK getting rid of redundant sender names in system notifications sent using sender name (see EXT-5010)
+ if (use_plain_text_chat_history && gAgentID != chat.mFromID && chat.mFromID.notNull())
+ {
+ std::string slurl_about = SLURL_APP_AGENT + chat.mFromID.asString() + SLURL_ABOUT;
+ if (message.length() > slurl_about.length() &&
+ message.compare(0, slurl_about.length(), slurl_about) == 0)
+ {
+ message = message.substr(slurl_about.length(), message.length()-1);
+ }
+ }
+
mEditor->appendText(message, FALSE, style_params);
}
mEditor->blockUndo();