diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-04-21 17:16:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 17:16:34 +0300 |
| commit | 5cfbf2035e625aa1778d38bbb14ff3d535da81e9 (patch) | |
| tree | b5f9c6546af8a65a9768567a84ee50ae1a860561 /indra | |
| parent | 9cdd52df3c166a4cd7c0ac495f0ca435af458503 (diff) | |
#5652 fix moderation status not being reliably shown when entering parcel voice space
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 2a0fdbfac1..c65f03ce61 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -3100,6 +3100,13 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b LL_WARNS("Voice") << "Expected object from data channel:" << data << LL_ENDL; return; } + + bool is_primary_region = mPrimary; + if (!mPrimary && isSpatial() && gAgent.getRegion()) + { + is_primary_region = (mRegionID == gAgent.getRegion()->getRegionID()); + LL_WARNS() << "mPrimary is false, expected: " << is_primary_region << " connection state: " << getVoiceConnectionState() << LL_ENDL; + } boost::json::object voice_data = voice_data_parsed.as_object(); boost::json::object mute; boost::json::object user_gain; @@ -3189,7 +3196,7 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b if (isSpatial()) { // ignore muted flags from non-primary server - if (mPrimary || primary) + if (is_primary_region || primary) { participant->mIsModeratorMuted = is_moderator_muted; if (gAgentID == agent_id) @@ -3207,11 +3214,15 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b } else { - if (isSpatial() && (mPrimary || primary)) + if (isSpatial() && (is_primary_region || primary)) { // mute info message can be received before join message, so try to mute again later if (participant_obj.contains("m") && participant_obj["m"].is_bool()) { + LL_WARNS() << "Mute info msg received: " << participant_obj["m"].as_bool() + << " but participant " << agent_id + << " was not found in channel " << mChannelID << LL_ENDL; + bool is_moderator_muted = participant_obj["m"].as_bool(); std::string channel_id = mChannelID; F32 delay { 1.5f }; @@ -3223,11 +3234,16 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b if (participant) { participant->mIsModeratorMuted = is_moderator_muted; + LL_WARNS() << "Participant " << agent_id << " is found after delay, is_muted: " << is_moderator_muted << LL_ENDL; if (gAgentID == agent_id) { LLNearbyVoiceModeration::getInstance()->setMutedInfo(channel_id, is_moderator_muted); } } + else + { + LL_WARNS() << "Participant " << agent_id << " is still not found in channel " << channel_id << LL_ENDL; + } }, delay); } } |
