diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llconversationlog.cpp | 23 | ||||
| -rw-r--r-- | indra/newview/llconversationlog.h | 3 | 
2 files changed, 23 insertions, 3 deletions
| diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index 7db6a93709..e80a709203 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -26,6 +26,7 @@  #include "llviewerprecompiledheaders.h"  #include "llagent.h" +#include "llavatarnamecache.h"  #include "llconversationlog.h"  #include "lltrans.h" @@ -152,6 +153,7 @@ void LLConversation::setListenIMFloaterOpened()  		mIMFloaterShowedConnection = LLIMFloater::setIMFloaterShowedCallback(boost::bind(&LLConversation::onIMFloaterShown, this, _1));  	}  } +  /************************************************************************/  /*             LLConversationLogFriendObserver implementation           */  /************************************************************************/ @@ -262,9 +264,16 @@ void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string  	LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);  	if (session)  	{ -		LLConversation conversation(*session); -		LLConversationLog::instance().logConversation(conversation); -		session->mVoiceChannel->setStateChangedCallback(boost::bind(&LLConversationLog::onVoiceChannelConnected, this, _5, _2)); +		if (LLIMModel::LLIMSession::P2P_SESSION == session->mSessionType) +		{ +			LLAvatarNameCache::get(session->mOtherParticipantID, boost::bind(&LLConversationLog::onAvatarNameCache, this, _1, _2, session)); +		} +		else +		{ +			LLConversation conversation(*session); +			LLConversationLog::instance().logConversation(conversation); +			session->mVoiceChannel->setStateChangedCallback(boost::bind(&LLConversationLog::onVoiceChannelConnected, this, _5, _2)); +		}  	}  } @@ -425,3 +434,11 @@ void LLConversationLog::onVoiceChannelConnected(const LLUUID& session_id, const  		}  	}  } + +void LLConversationLog::onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, LLIMModel::LLIMSession* session) +{ +	LLConversation conversation(*session); +	conversation.setConverstionName(av_name.getCompleteName()); +	LLConversationLog::instance().logConversation(conversation); +	session->mVoiceChannel->setStateChangedCallback(boost::bind(&LLConversationLog::onVoiceChannelConnected, this, _5, _2)); +} diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 9fd54c61c9..0d7f0080e5 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -62,6 +62,7 @@ public:  	void	setIsVoice(bool is_voice);  	void	setIsPast (bool is_past) { mIsConversationPast = is_past; } +	void	setConverstionName(std::string conv_name) { mConversationName = conv_name; }  	/*  	 * Resets flag of unread offline message to false when im floater with this conversation is opened. @@ -156,6 +157,8 @@ private:  	bool saveToFile(const std::string& filename);  	bool loadFromFile(const std::string& filename); +	void onAvatarNameCache(const LLUUID& participant_id, const LLAvatarName& av_name, LLIMModel::LLIMSession* session); +  	typedef std::vector<LLConversation> conversations_vec_t;  	std::vector<LLConversation>				mConversations;  	std::set<LLConversationLogObserver*>	mObservers; | 
