diff options
| author | Mike Antipov <mantipov@productengine.com> | 2010-01-14 21:12:03 +0200 | 
|---|---|---|
| committer | Mike Antipov <mantipov@productengine.com> | 2010-01-14 21:12:03 +0200 | 
| commit | 0969315be48db3acf210abfacd4f0eaa381b2d27 (patch) | |
| tree | 59b845dcdb842094f19590f30c815f84f4069d56 | |
| parent | ab935fbeee57b32f68503395d71d9366e65db73b (diff) | |
Fixed normal bug EXT-4216 ( Avatars looks active in group voice chat when relogin after has left voice chat)
- improved LLCallFloater::validateSpeaker callback to process participants has left group voice chat
--HG--
branch : product-engine
| -rw-r--r-- | indra/newview/llcallfloater.cpp | 27 | 
1 files changed, 21 insertions, 6 deletions
| diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c0efb85b51..6317a6a392 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -724,13 +724,28 @@ void LLCallFloater::removeVoiceRemoveTimer(const LLUUID& voice_speaker_id)  bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id)  { -	if (mVoiceType != VC_LOCAL_CHAT) -		return true; +	bool is_valid = true; +	switch (mVoiceType) +	{ +	case  VC_LOCAL_CHAT: +		{ +			// A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice). +			std::vector<LLUUID> speakers; +			get_voice_participants_uuids(speakers); +			is_valid = std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end(); +		} +		break; +	case VC_GROUP_CHAT: +		// if participant had left this call before do not allow add her again. See EXT-4216. +		// but if she Join she will be added into the list from the LLCallFloater::onChange() +		is_valid = STATE_LEFT != getState(speaker_id); +		break; +	default: +		// do nothing. required for Linux build +		break; +	} -	// A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice). -	std::vector<LLUUID> speakers; -	get_voice_participants_uuids(speakers); -	return std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end(); +	return is_valid;  }  void LLCallFloater::connectToChannel(LLVoiceChannel* channel) | 
