summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-01-14 21:12:03 +0200
committerMike Antipov <mantipov@productengine.com>2010-01-14 21:12:03 +0200
commit0969315be48db3acf210abfacd4f0eaa381b2d27 (patch)
tree59b845dcdb842094f19590f30c815f84f4069d56
parentab935fbeee57b32f68503395d71d9366e65db73b (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.cpp27
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)