diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimview.cpp | 34 | ||||
-rw-r--r-- | indra/newview/llimview.h | 4 | ||||
-rw-r--r-- | indra/newview/llvoicechannel.cpp | 24 |
3 files changed, 43 insertions, 19 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 494b5d1e56..01e1c3caa0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -495,6 +495,11 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) return NULL; } +bool LLIMModel::LLIMSession::isOutgoingAdHoc() +{ + return IM_SESSION_CONFERENCE_START == mType; +} + bool LLIMModel::LLIMSession::isAdHoc() { return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); @@ -1032,24 +1037,25 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // 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 LLPointer<LLSpeaker>& speakerp = *it; - - LLRecentPeople::instance().add(speakerp->mID); - } + addSpeakersToRecent(im_session_id); } } +} - +void LLIMModel::addSpeakersToRecent(const LLUUID& im_session_id) +{ + 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 LLPointer<LLSpeaker>& speakerp = *it; + LLRecentPeople::instance().add(speakerp->mID); + } } void session_starter_helper( diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index ba8c7ae489..f7a4406f00 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -84,6 +84,7 @@ public: /** @deprecated */ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); + bool isOutgoingAdHoc(); bool isAdHoc(); bool isP2P(); bool isOtherParticipantAvaline(); @@ -273,6 +274,9 @@ public: static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); + // Adds people from speakers list (people with whom you are currently speaking) to the Recent People List + static void addSpeakersToRecent(const LLUUID& im_session_id); + void testMessages(); /** diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9e3d61ae44..b692093fb9 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -497,14 +497,28 @@ void LLVoiceChannelGroup::activate() mURI, mCredentials); -#if 0 // *TODO if (!gAgent.isInGroup(mSessionID)) // ad-hoc channel { - // Add the party to the list of people with which we've recently interacted. - for (/*people in the chat*/) - LLRecentPeople::instance().add(buddy_id); + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionID); + // Adding ad-hoc call participants to Recent People List. + // If it's an outgoing ad-hoc, we can use mInitialTargetIDs that holds IDs of people we + // called(both online and offline) as source to get people for recent (STORM-210). + if (session->isOutgoingAdHoc()) + { + for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); + it!=session->mInitialTargetIDs.end();++it) + { + const LLUUID id = *it; + LLRecentPeople::instance().add(id); + } + } + // If this ad-hoc is incoming then trying to get ids of people from mInitialTargetIDs + // would lead to EXT-8246. So in this case we get them from speakers list. + else + { + LLIMModel::addSpeakersToRecent(mSessionID); + } } -#endif //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) |