From 0c828289c04a9783eab72d2e9f77903f96f2bc62 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Mon, 30 Nov 2009 18:15:09 +0200 Subject: renamed LLHandlerUtil::logToIM to LLHandlerUtil::logToIMP2P; avoided IM-toast popup when adding message to session; --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index e1236b935e..112d829563 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -52,7 +52,7 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) } // static -void LLHandlerUtil::logToIM(const LLNotificationPtr& notification) +void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) { // add message to IM const std::string @@ -82,7 +82,18 @@ void LLHandlerUtil::logToIM(const LLNotificationPtr& notification) return; } - LLIMModel::instance().addMessageSilently(*session, name, from_id, + + // store active session id + const LLUUID & active_session_id = + LLIMModel::instance().getActiveSessionID(); + + // set created session as active to avoid IM toast popup + LLIMModel::instance().setActiveSessionID(session->mSessionID); + + LLIMModel::instance().addMessage(session->mSessionID, name, from_id, notification->getMessage()); + + // restore active session id + LLIMModel::instance().setActiveSessionID(active_session_id); } } -- cgit v1.2.3