From 09ef4a2417f8400b03185adec859edd76e59823a Mon Sep 17 00:00:00 2001
From: Andrew Productengine <adyukov@productengine.com>
Date: Mon, 27 Sep 2010 18:18:03 +0300
Subject: [PATCH] STORM-153 ADDITIONAL FIX Properly fixed unlocalized chiclet
 tooltip and syswell session names for adhoc.

Bug was caused by using unlocalized name of session as argument in LLIMModel::newSession() after the session name was localized in constructor.

- Used correct session name in LLIMModel::newSession(). Adding similar logic to addMessage() turned out to be unnecessary and also caused regression (VWR-23180),
so previous fix of the same bug(8ab901af1241) was backed out in 28ed1b4cf4cd. Erroneous part was excluded from this fix.
---
 indra/newview/llimview.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 493398c68a0..494b5d1e56b 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -622,7 +622,10 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co
 	LLIMSession* session = new LLIMSession(session_id, name, type, other_participant_id, ids, voice);
 	mId2SessionMap[session_id] = session;
 
-	LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, name, other_participant_id);
+	// When notifying observer, name of session is used instead of "name", because they may not be the
+	// same if it is an adhoc session (in this case name is localized in LLIMSession constructor).
+	std::string session_name = LLIMModel::getInstance()->getName(session_id);
+	LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, session_name, other_participant_id);
 
 	return true;
 
-- 
GitLab