diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-02-15 16:43:52 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-02-15 16:43:52 +0200 |
commit | 5a1ef0214a904d13d942059420b412eaf5d7017e (patch) | |
tree | 2e69744cf39763a58dbdf05ecf0229fa646b33bd | |
parent | c9fabaca4e759c2d6231176f9dc7847e461c4865 (diff) |
fixed EXT-5010 Redundant resident name in the IM log for offers
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llchathistory.cpp | 17 |
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(); |