Commits

Andrew Dyukov  committed 596ff33

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/

  • Participants
  • Parent commits 1d6b75e
  • Branches product-engine

Comments (0)

Files changed (1)

File indra/newview/llimview.cpp

 
 	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
 		{
 			// 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)
 			{
-				const LLUUID id = *it;
-
-				LLRecentPeople::instance().add(id);
+				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);
 			}
 		}
-#endif
 	}