diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-28 17:43:21 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-11-28 17:43:21 +0200 |
commit | f0426b924f543c62268ac5098c0c2c6a44e68084 (patch) | |
tree | 63d81cf896b107cf35b3eecabefc032e021574df /indra/newview/llimview.cpp | |
parent | 1cc80c60ca37453a8a15f84e61cb2491f2f57403 (diff) |
implemented EXT-2889 "Incoming "grant modify rights" message should trigger
notify toast and adding record to IM history";
fixed avatar icon in IM-floater when message added to IM-session;
avoided popup of IM-tast when message added to IM-session;
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index dff339fa63..2f88578739 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -476,19 +476,17 @@ bool LLIMModel::proccessOnlineOfflineNotification( } bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) { + const std::string& utf8_text, bool log2file /* = true */) +{ LLIMSession* session = findIMSession(session_id); - if (!session) + if (!session) { llwarns << "session " << session_id << "does not exist " << llendl; return false; } - addToHistory(session_id, from, from_id, utf8_text); - if (log2file) logToFile(session_id, from, from_id, utf8_text); - - session->mNumUnread++; + addMessageSilently(*session, from, from_id, utf8_text, log2file); // notify listeners LLSD arg; @@ -503,6 +501,15 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co return true; } +void LLIMModel::addMessageSilently(LLIMSession& session, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) +{ + addToHistory(session.mSessionID, from, from_id, utf8_text); + if (log2file) logToFile(session.mSessionID, from, from_id, utf8_text); + + session.mNumUnread++; +} + const std::string& LLIMModel::getName(const LLUUID& session_id) const { |