diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-09-08 16:39:25 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-09-08 16:39:25 -0700 |
commit | 40a6786af669cd8ed030d1e6f0de43d98492f98a (patch) | |
tree | 9a94ea18da60fce5b42ab9a2a068fb28f5f73d64 /indra | |
parent | df97ed70de7bda85f2eda9d00daf18d6d1ea3397 (diff) |
Fixing chat logs to use username
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimview.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llimview.h | 2 |
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); |