summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationlog.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2012-09-06 23:16:22 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2012-09-06 23:16:22 +0300
commitfd17cb601465b3433b647b895baede9b0fd822dd (patch)
treebcaea772971c92443b454e24d5584bc4c39d0e6b /indra/newview/llconversationlog.cpp
parent1a913365b594de81de56896a9fbdfd6d8c4f21e0 (diff)
CHUI-320 FIXED (Inconsistent name formatting in conversation log depending if user started conversation or not)
- On P2P session started, before creating entry of conversation log, requesting avatar name in form of Display Name (user.name)
Diffstat (limited to 'indra/newview/llconversationlog.cpp')
-rw-r--r--indra/newview/llconversationlog.cpp23
1 files changed, 20 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));
+}