summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationhandlerutil.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2009-11-30 18:15:49 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2009-11-30 18:15:49 +0200
commit288f67e46207220c589cdb82d464070c1bf1ab75 (patch)
tree2323c715cd2f44e8609eeb8ee91e23e4366296bd /indra/newview/llnotificationhandlerutil.cpp
parentcbab53ec392fbf3cb1e34324f0a96d04dd084ce6 (diff)
parent0c828289c04a9783eab72d2e9f77903f96f2bc62 (diff)
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp15
1 files changed, 13 insertions, 2 deletions
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);
}
}