fixed reopened subtask EXT-2265 IM unread messages counter should not be increased for system messages (comming from "Second Life", zero uuid)

now not counting messages with from = "Second Life" and from_id = receiver's uuid

--HG--
branch : product-engine
master
Igor Borovkov 2009-11-11 19:19:07 +02:00
parent b8a672adaf
commit 14c668bb97
1 changed files with 5 additions and 2 deletions

View File

@ -439,8 +439,11 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
addToHistory(session_id, from, from_id, utf8_text);
if (log2file) logToFile(session_id, from, from_id, utf8_text);
//we do not count system messages
if (from_id.notNull()) session->mNumUnread++;
//we do not count system messages and our messages
if (from_id.notNull() && from_id != gAgentID && SYSTEM_FROM != from)
{
session->mNumUnread++;
}
// notify listeners
LLSD arg;