diff options
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() |
