diff options
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 { |