From 43bb3d00ecba66fe3dd9fa5a2d487ffc5633ed5e Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Tue, 26 Jan 2010 18:25:42 +0200
Subject: =?UTF-8?q?fixed=20EXT-4643=20=E2=80=9CIM=20toasts=20don't=20appea?=
 =?UTF-8?q?r=20after=20few=20teleport=20offers=20were=20sent=20to=20that?=
 =?UTF-8?q?=20avatar=E2=80=9D=20corrected=20checking=20opened=20active=20I?=
 =?UTF-8?q?M=20session;=20corrected=20restoring=20active=20IM=20session=20?=
 =?UTF-8?q?after=20logging=20IM=20notification;?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/newview/llimview.cpp                  | 3 ++-
 indra/newview/llnotificationhandlerutil.cpp | 9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 1b1e6501c0..f90a51c3f3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -95,7 +95,8 @@ void toast_callback(const LLSD& msg){
 	}
 
 	// check whether incoming IM belongs to an active session or not
-	if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
+	if (LLIMModel::getInstance()->getActiveSessionID().notNull()
+			&& LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
 	{
 		return;
 	}
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index fba5773602..02f948eca9 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -123,7 +123,14 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
 				message);
 
 		// restore active session id
-		LLIMModel::instance().setActiveSessionID(active_session_id);
+		if (active_session_id.isNull())
+		{
+			LLIMModel::instance().resetActiveSessionID();
+		}
+		else
+		{
+			LLIMModel::instance().setActiveSessionID(active_session_id);
+		}
 	}
 }
 
-- 
cgit v1.2.3