Skip to content

Commit a4d01ed

Browse files
Show moderator options only on webrtc region
1 parent 74a64d2 commit a4d01ed

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

indra/newview/llnearbyvoicemoderation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ void LLNearbyVoiceModeration::showMutedNotification(bool is_muted)
189189

190190
bool LLNearbyVoiceModeration::isNearbyChatModerator()
191191
{
192-
return gAgent.canManageEstate() || LLViewerParcelMgr::getInstance()->allowVoiceModeration();
192+
return gAgent.getRegion() && gAgent.getRegion()->isRegionWebRTCEnabled() &&
193+
(gAgent.canManageEstate() || LLViewerParcelMgr::getInstance()->allowVoiceModeration());
193194
}
194195

indra/newview/llviewerregion.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,16 @@ std::string LLViewerRegion::getSimHostName()
37983798
return std::string("...");
37993799
}
38003800

3801+
3802+
bool LLViewerRegion::isRegionWebRTCEnabled()
3803+
{
3804+
if (mSimulatorFeaturesReceived && mSimulatorFeatures.has("VoiceServerType"))
3805+
{
3806+
return mSimulatorFeatures["VoiceServerType"].asString() == "webrtc";
3807+
}
3808+
return false;
3809+
}
3810+
38013811
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
38023812
{
38033813
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;

indra/newview/llviewerregion.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ class LLViewerRegion: public LLCapabilityProvider // implements this interface
424424

425425
std::string getSimHostName();
426426

427+
bool isRegionWebRTCEnabled();
428+
427429
static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;}
428430

429431
// rebuild reflection probe list

indra/newview/llvoicewebrtc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,8 +3168,6 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b
31683168
participant->mIsSpeaking = participant_obj["v"].as_bool();
31693169
}
31703170

3171-
// Currently, viewer doesn't receive this info when the user is muted in Nearby chat,
3172-
// but it *does* receive it when muted in Group chat. A server-side change is required.
31733171
if (participant_obj.contains("m") && participant_obj["m"].is_bool())
31743172
{
31753173
participant->mIsModeratorMuted = participant_obj["m"].as_bool();

0 commit comments

Comments
 (0)