diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-08-19 15:11:37 +0300 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-08-19 15:11:37 +0300 |
commit | b091125a0e53bef47bd968be78b55150807595ed (patch) | |
tree | 7ae5690965071ea59aa9f70aced9d56668eda079 | |
parent | 6c4b0f82bce84bcd8dda42ccc25edc906c873765 (diff) |
EXT-8658 FIXED Made only online participants of Adhoc chat to be shown shown in Recent Tab.
Used previously commented code which adds only online paricipants instead of current code that added all.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/860/
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llimview.cpp | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cd35ec5d39..41e505cc58 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1021,19 +1021,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (is_not_group_id) { - -#if 0 - //use this code to add only online members - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); - LLSpeakerMgr::speaker_list_t speaker_list; - speaker_mgr->getSpeakerList(&speaker_list, true); - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) - { - const LLPointer<LLSpeaker>& speakerp = *it; - - LLRecentPeople::instance().add(speakerp->mID); - } -#else LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(im_session_id); if( session == 0)//??? shouldn't really happen { @@ -1048,16 +1035,20 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. - for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); - it!=session->mInitialTargetIDs.end();++it) + // Add only online members to recent (EXT-8658) + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); + LLSpeakerMgr::speaker_list_t speaker_list; + if(speaker_mgr != NULL) + { + speaker_mgr->getSpeakerList(&speaker_list, true); + } + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { - const LLUUID id = *it; + const LLPointer<LLSpeaker>& speakerp = *it; - LLRecentPeople::instance().add(id); + LLRecentPeople::instance().add(speakerp->mID); } } -#endif } |