diff options
author | Callum Prentice <callum@lindenlab.com> | 2010-01-15 13:27:25 -0800 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2010-01-15 13:27:25 -0800 |
commit | 7590704e0e93b48f897c47dba07916efebd95274 (patch) | |
tree | e38f863dc5a72bc078d362a9fee214e018d0ca05 /indra/newview/llcallfloater.cpp | |
parent | 940e070326e920b6314c7153f687d9985ad763ed (diff) | |
parent | 7efc0fbb4fd912d59a38a4d5653f1dc12c3876b1 (diff) |
Merge with Tip
Diffstat (limited to 'indra/newview/llcallfloater.cpp')
-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) |