summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicechannel.cpp
diff options
context:
space:
mode:
authorAndrew Productengine <adyukov@productengine.com>2010-09-27 22:30:50 +0300
committerAndrew Productengine <adyukov@productengine.com>2010-09-27 22:30:50 +0300
commit2d6db708f41681268235e3c616414d9d1391a25b (patch)
tree5a838454663bea5329db634aad44f27377886d8c /indra/newview/llvoicechannel.cpp
parente6688f993f82d2683e3eadce96c893959c94be2d (diff)
STORM-210 FIXED Implemented adding of ad-hoc call participans in Recent.
Both offline and online users are added. It is done in LLVoiceChannelGroup::activate(), where TODO for it was placed earlier. To avoid code duplication when adding users from speakers list to Recent, a new method was added to LLIMModel.
Diffstat (limited to 'indra/newview/llvoicechannel.cpp')
-rw-r--r--indra/newview/llvoicechannel.cpp24
1 files changed, 19 insertions, 5 deletions
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())