From 265805a1b02555c01f9f2ac42000dbc731ab31c6 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Mon, 2 Nov 2009 17:33:42 +0200
Subject: [PATCH] fixed low bug EXT-1941 'User is offline' message appears
 every time you performe double mouse click on avatar's while IM has been
 already started

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cdcb284ceea..66a3e3e85c0 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1597,7 +1597,9 @@ LLUUID LLIMMgr::addSession(
 
 	LLUUID session_id = computeSessionID(dialog,other_participant_id);
 
-	if (!LLIMModel::getInstance()->findIMSession(session_id))
+	bool new_session = !LLIMModel::getInstance()->findIMSession(session_id);
+
+	if (new_session)
 	{
 		LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids);
 	}
@@ -1619,6 +1621,9 @@ LLUUID LLIMMgr::addSession(
 			ids);
 	}
 
+	//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
+	if (!new_session) return session_id;
+	
 	noteOfflineUsers(session_id, floater, ids);
 
 	// Only warn for regular IMs - not group IMs
@@ -1627,8 +1632,6 @@ LLUUID LLIMMgr::addSession(
 		noteMutedUsers(session_id, floater, ids);
 	}
 
-
-
 	return session_id;
 }
 
-- 
GitLab