From aa2640f13ab61fa55819af26b001978fa2dd9a3f Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 13 Nov 2012 14:04:14 +0200 Subject: CHUI-447 FIXED Set session name as avatar's display name, if session is created by getting new message. --- indra/newview/llimview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llimview.cpp') 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 -- cgit v1.2.3