summaryrefslogtreecommitdiff
path: root/indra/newview/lllogchat.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-02-25 11:41:52 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-02-25 11:41:52 -0800
commit3c121e83446a755220f83f21637193d011c5b5a7 (patch)
tree2acce3ee945ca60e635f44b8c27f40b73e6cea94 /indra/newview/lllogchat.cpp
parentc70a951abd0993c85aa96a930a54ff89c93cd03a (diff)
parentcbbf1504f015f42e3426a92129824e05021e1fe3 (diff)
merge
Diffstat (limited to 'indra/newview/lllogchat.cpp')
-rw-r--r--indra/newview/lllogchat.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 17b72c5023..09f816a4e6 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -28,6 +28,7 @@
#include "llagent.h"
#include "llagentui.h"
+#include "llavatarnamecache.h"
#include "lllogchat.h"
#include "lltrans.h"
#include "llviewercontrol.h"
@@ -540,6 +541,31 @@ void LLLogChat::deleteTranscripts()
LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true);
}
+// static
+bool LLLogChat::isTranscriptExist(const LLUUID& avatar_id)
+{
+ std::vector<std::string> list_of_transcriptions;
+ LLLogChat::getListOfTranscriptFiles(list_of_transcriptions);
+
+ if (list_of_transcriptions.size() > 0)
+ {
+ 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 (std::string::npos != transcript_file_name.find(avatar_user_name))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
//*TODO mark object's names in a special way so that they will be distinguishable form avatar name
//which are more strict by its nature (only firstname and secondname)
//Example, an object's name can be written like "Object <actual_object's_name>"