From b31cd0a7e927920fae820582fcff78078e6f3bfc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Feb 2019 17:40:41 +0200 Subject: SL-10347 Fixed Users can't exchange text messages after moderator click on "Mute everyone" --- indra/newview/llconversationmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llconversationmodel.cpp') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index ebbbf23dee..bea1f78284 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -605,16 +605,16 @@ void LLConversationItemParticipant::muteVoice(bool mute_voice) LLAvatarName av_name; LLAvatarNameCache::get(mUUID, &av_name); LLMuteList * mute_listp = LLMuteList::getInstance(); - bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName()); + bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName(), LLMute::flagVoiceChat); LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT); if (voice_already_muted && !mute_voice) { - mute_listp->remove(mute); + mute_listp->remove(mute, LLMute::flagVoiceChat); } else if (!voice_already_muted && mute_voice) { - mute_listp->add(mute); + mute_listp->add(mute, LLMute::flagVoiceChat); } } -- cgit v1.2.3 From 3a8053eb9fc0db52b9fb5ae02f1807acbb4e072d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Feb 2019 19:01:28 +0200 Subject: SL-10351 Fixed Avatars muted by Group moderator become Blocked forever --- indra/newview/llconversationmodel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llconversationmodel.cpp') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index bea1f78284..c715815208 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -351,7 +351,7 @@ void LLConversationItemSession::setParticipantIsMuted(const LLUUID& participant_ LLConversationItemParticipant* participant = findParticipant(participant_id); if (participant) { - participant->muteVoice(is_muted); + participant->moderateVoice(is_muted); } } @@ -498,6 +498,7 @@ void LLConversationItemSession::onAvatarNameCache(const LLAvatarName& av_name) LLConversationItemParticipant::LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(display_name,uuid,root_view_model), + mIsModeratorMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -508,6 +509,7 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : LLConversationItem(uuid,root_view_model), + mIsModeratorMuted(false), mIsModerator(false), mDisplayModeratorLabel(false), mDistToAgent(-1.0) @@ -597,7 +599,7 @@ void LLConversationItemParticipant::setDisplayModeratorRole(bool displayRole) bool LLConversationItemParticipant::isVoiceMuted() { - return LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); + return mIsModeratorMuted || LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); } void LLConversationItemParticipant::muteVoice(bool mute_voice) -- cgit v1.2.3 From a8afd345a0ad36eda4b9edb0664004dbdd0b2082 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 15 Feb 2019 15:03:27 +0200 Subject: SL-10351 Cleanup --- indra/newview/llconversationmodel.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'indra/newview/llconversationmodel.cpp') diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index c715815208..c258136889 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -602,24 +602,6 @@ bool LLConversationItemParticipant::isVoiceMuted() return mIsModeratorMuted || LLMuteList::getInstance()->isMuted(mUUID, LLMute::flagVoiceChat); } -void LLConversationItemParticipant::muteVoice(bool mute_voice) -{ - LLAvatarName av_name; - LLAvatarNameCache::get(mUUID, &av_name); - LLMuteList * mute_listp = LLMuteList::getInstance(); - bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName(), LLMute::flagVoiceChat); - - LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT); - if (voice_already_muted && !mute_voice) - { - mute_listp->remove(mute, LLMute::flagVoiceChat); - } - else if (!voice_already_muted && mute_voice) - { - mute_listp->add(mute, LLMute::flagVoiceChat); - } -} - // // LLConversationSort // -- cgit v1.2.3