diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-04-08 18:59:58 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-04-08 18:59:58 -0700 |
| commit | 21d7c1d0ba7fa548e5ea88010bb72e47656a53f5 (patch) | |
| tree | 83e2cc97b9a7967f221c353d726dd0077cb1fa5e /indra/newview/lllogchat.cpp | |
| parent | d533a33f4229244405ed0b247fce410513b6c3e9 (diff) | |
| parent | 48d98b493038240b639775a93b33e4f9357e408f (diff) | |
Pull merge
Diffstat (limited to 'indra/newview/lllogchat.cpp')
| -rw-r--r-- | indra/newview/lllogchat.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 2d7454b636..82409da4ba 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -631,7 +631,7 @@ void LLLogChat::deleteTranscripts() } // static -bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id) +bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id, bool is_group) { std::vector<std::string> list_of_transcriptions; LLLogChat::getListOfTranscriptFiles(list_of_transcriptions); @@ -641,15 +641,31 @@ bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id) LLAvatarName avatar_name; LLAvatarNameCache::get(avatar_id, &avatar_name); std::string avatar_user_name = avatar_name.getAccountName(); - std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_'); - - BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + if(!is_group) { - if (std::string::npos != transcript_file_name.find(avatar_user_name)) + std::replace(avatar_user_name.begin(), avatar_user_name.end(), '.', '_'); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) { - return true; + if (std::string::npos != transcript_file_name.find(avatar_user_name)) + { + return true; + } } } + else + { + std::string file_name; + gCacheName->getGroupName(avatar_id, file_name); + file_name = makeLogFileName(file_name); + BOOST_FOREACH(std::string& transcript_file_name, list_of_transcriptions) + { + if (transcript_file_name == file_name) + { + return true; + } + } + } + } return false; |
