summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2025-11-27 20:51:35 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2025-11-27 20:51:35 +0200
commita9e8676611bf0ffda077a6d7561e0d57f9e3fcf7 (patch)
treec18543c217b9a86c2bc0a0ebc6edbfc11c496b3c /indra
parentec149b515c26cec64d1666df5aeb441ea052cf19 (diff)
#5055 don't show moderate menu if the user is not parcel owner within a parcel with restricted voice
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnearbyvoicemoderation.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llnearbyvoicemoderation.cpp b/indra/newview/llnearbyvoicemoderation.cpp
index d3e540e838..668365d266 100644
--- a/indra/newview/llnearbyvoicemoderation.cpp
+++ b/indra/newview/llnearbyvoicemoderation.cpp
@@ -194,7 +194,19 @@ bool LLNearbyVoiceModeration::showMutedNotification(bool is_muted)
bool LLNearbyVoiceModeration::isNearbyChatModerator()
{
- return gAgent.getRegion() && gAgent.getRegion()->isRegionWebRTCEnabled() &&
- (gAgent.canManageEstate() || LLViewerParcelMgr::getInstance()->allowVoiceModeration());
-}
+ // Region doesn't support WebRTC voice
+ if (!gAgent.getRegion() || !gAgent.getRegion()->isRegionWebRTCEnabled())
+ {
+ return false;
+ }
+ if (LLViewerParcelMgr::getInstance()->isVoiceRestricted())
+ {
+ // Only the parcel owner should have access to moderate parcel voice space
+ return LLViewerParcelMgr::getInstance()->allowVoiceModeration();
+ }
+ else
+ {
+ return gAgent.canManageEstate();
+ }
+}