diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-30 19:59:44 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-30 19:59:44 +0200 |
commit | 5ed4c7015641b0739291c7fc75b67aa5b0ed36fc (patch) | |
tree | c451ded3878e52f8226104b25a52b9cb7a473915 /indra/newview/llnotificationhandlerutil.cpp | |
parent | 1a622243096d77856cc4ed2590dd99dd480e587e (diff) |
implemented EXT-2962 “Implement adding messages into IM history w/o spawning
chiclet”
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 112d829563..a30f896fa2 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -71,29 +71,23 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); if (session == NULL) { - session_id = LLIMMgr::instance().addSession(name, - IM_NOTHING_SPECIAL, from_id); - session = LLIMModel::instance().findIMSession(session_id); + LLIMModel::instance().logToFile(session_id, name, from_id, + notification->getMessage()); } - - if (session == NULL) + else { - llerrs << "session " << session_id << "does not exist " << llendl; - return; - } + // store active session id + const LLUUID & active_session_id = + LLIMModel::instance().getActiveSessionID(); + // set searched session as active to avoid IM toast popup + LLIMModel::instance().setActiveSessionID(session->mSessionID); - // store active session id - const LLUUID & active_session_id = - LLIMModel::instance().getActiveSessionID(); + LLIMModel::instance().addMessage(session->mSessionID, name, from_id, + notification->getMessage()); - // 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); + // restore active session id + LLIMModel::instance().setActiveSessionID(active_session_id); + } } } |