diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-14 16:19:57 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-14 16:19:57 +0200 |
| commit | e740bd21e39e93666445abfeb32cf476c249cfb7 (patch) | |
| tree | 1df16ba9894c812e025b321e540674aa5149ee11 /indra/newview/llnearbyvoicemoderation.cpp | |
| parent | bee23b4956b424f99765fb099906d3cb8250ce63 (diff) | |
Toggle off 'Speak' button when muted by moderator
Diffstat (limited to 'indra/newview/llnearbyvoicemoderation.cpp')
| -rw-r--r-- | indra/newview/llnearbyvoicemoderation.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llnearbyvoicemoderation.cpp b/indra/newview/llnearbyvoicemoderation.cpp index 5a6d7e1c6b..d3e540e838 100644 --- a/indra/newview/llnearbyvoicemoderation.cpp +++ b/indra/newview/llnearbyvoicemoderation.cpp @@ -165,24 +165,31 @@ void LLNearbyVoiceModeration::setMutedInfo(const std::string& channelID, bool mu it->second = mute; } } + if (mute && LLVoiceClient::getInstance()->getUserPTTState()) + { + LLVoiceClient::getInstance()->setUserPTTState(false); + } } -void LLNearbyVoiceModeration::showNotificationIfNeeded() +bool LLNearbyVoiceModeration::showNotificationIfNeeded() { if (LLVoiceClient::getInstance()->inProximalChannel() && LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID)) { - showMutedNotification(true); + return showMutedNotification(true); } + return false; } -void LLNearbyVoiceModeration::showMutedNotification(bool is_muted) +bool LLNearbyVoiceModeration::showMutedNotification(bool is_muted) { // Check if the current voice channel is nearby chat if (LLVoiceClient::getInstance()->inProximalChannel()) { LLNotificationsUtil::add(is_muted ? "NearbyVoiceMutedByModerator" : "NearbyVoiceUnmutedByModerator"); + return true; } + return false; } bool LLNearbyVoiceModeration::isNearbyChatModerator() |
