Fixing chat logs to use username
parent
df97ed70de
commit
40a6786af6
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue