summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimview.cpp11
-rw-r--r--indra/newview/llimview.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 070e384fa4..7109f9e21e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -518,6 +518,11 @@ bool LLIMModel::LLIMSession::isOtherParticipantAvaline()
return !mOtherParticipantIsAvatar;
}
+void LLIMModel::LLIMSession::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
+{
+ mHistoryFileName = av_name.mUsername;
+}
+
void LLIMModel::LLIMSession::buildHistoryFileName()
{
mHistoryFileName = mName;
@@ -536,6 +541,12 @@ void LLIMModel::LLIMSession::buildHistoryFileName()
//in case of incoming ad-hoc sessions
mHistoryFileName = mName + " " + LLLogChat::timestamp(true) + " " + mSessionID.asString().substr(0, 4);
}
+
+ // look up username to use as the log name
+ if (isP2P())
+ {
+ LLAvatarNameCache::get(mOtherParticipantID, boost::bind(&LLIMModel::LLIMSession::onAvatarNameCache, this, _1, _2));
+ }
}
//static
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index c95f98f552..d566a4d03f 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -97,6 +97,8 @@ public:
/** ad-hoc sessions involve sophisticated chat history file naming schemes */
void buildHistoryFileName();
+ void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name);
+
//*TODO make private
static std::string generateHash(const std::set<LLUUID>& sorted_uuids);