summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2012-11-13 14:04:14 +0200
committermaxim_productengine <mnikolenko@productengine.com>2012-11-13 14:04:14 +0200
commitaa2640f13ab61fa55819af26b001978fa2dd9a3f (patch)
tree93fde9e9c79d839e77e723fb5dedbdc35d18da2f /indra/newview/llimview.cpp
parent6ba822c0fffcf86c79d25c44625c2667ac23e64a (diff)
CHUI-447 FIXED Set session name as avatar's display name, if session is created by getting new message.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6712127750..781b0cb2ea 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2424,14 +2424,21 @@ void LLIMMgr::addMessage(
//*NOTE session_name is empty in case of incoming P2P sessions
std::string fixed_session_name = from;
+ bool name_is_setted = false;
if(!session_name.empty() && session_name.size()>1)
{
fixed_session_name = session_name;
+ name_is_setted = true;
}
bool new_session = !hasSession(new_session_id);
if (new_session)
{
+ LLAvatarName av_name;
+ if (LLAvatarNameCache::get(other_participant_id, &av_name) && !name_is_setted)
+ {
+ fixed_session_name = (av_name.mDisplayName.empty() ? av_name.mUsername : av_name.mDisplayName);
+ }
LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id, false, is_offline_msg);
// When we get a new IM, and if you are a god, display a bit