summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-01-06 17:18:01 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2010-01-06 17:18:01 +0200
commit4f1d776da73df732f1c43c63f68917214bda7806 (patch)
tree2cd9d5a15d7e3e497cb4dad5d7aa3ced2fff3331
parentc0d189a3d1496da697b1b9878cf00de28f8df77d (diff)
fix for major EXT-3999 (nobody) appears in the Recent tab after receiving system notification
--HG-- branch : product-engine
-rw-r--r--indra/newview/llimview.cpp10
-rw-r--r--indra/newview/llimview.h5
2 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index daabf1f717..87b2793f9f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -382,10 +382,6 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f
mSpeakers->speakerChatted(from_id);
mSpeakers->setSpeakerTyping(from_id, FALSE);
}
-
- if( mSessionType == P2P_SESSION ||
- mSessionType == ADHOC_SESSION)
- LLRecentPeople::instance().add(from_id);
}
void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list<LLSD>& history)
@@ -684,6 +680,12 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file);
if (!session) return false;
+ //good place to add some1 to recent list
+ //other places may be called from message history.
+ if( !from_id.isNull() &&
+ ( session->isP2PSessionType() || session->isAdHocSessionType() ) )
+ LLRecentPeople::instance().add(from_id);
+
// notify listeners
LLSD arg;
arg["session_id"] = session_id;
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 20d8e28392..e72bda6c2b 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -78,6 +78,11 @@ public:
bool isP2P();
bool isOtherParticipantAvaline();
+ bool isP2PSessionType() const { return mSessionType == P2P_SESSION;}
+ bool isAdHocSessionType() const { return mSessionType == ADHOC_SESSION;}
+ bool isGroupSessionType() const { return mSessionType == GROUP_SESSION;}
+ bool isAvalineSessionType() const { return mSessionType == AVALINE_SESSION;}
+
LLUUID mSessionID;
std::string mName;
EInstantMessage mType;