From e028a437e9bcc6f102e5d2eaee2b659367f5b0e3 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 10 Dec 2025 17:37:00 +0200 Subject: #5129 Hide moderator options for participants who are not connected to the same voice space --- indra/newview/llfloaterimcontainer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 00b9c0b052..5f9d3ac304 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -536,6 +536,8 @@ void LLFloaterIMContainer::idleUpdate() const LLConversationItem* nearby_session = getSessionModel(LLUUID()); if (nearby_session) { + LLSpeakerMgr* speaker_mgr = (LLSpeakerMgr*)(LLLocalSpeakerMgr::getInstance()); + LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = nearby_session->getChildrenBegin(); LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = nearby_session->getChildrenEnd(); while (current_participant_model != end_participant_model) @@ -544,7 +546,15 @@ void LLFloaterIMContainer::idleUpdate() dynamic_cast((*current_participant_model).get()); if (participant_model) { - participant_model->setModeratorOptionsVisible(LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator()); + bool show_moderator_options = LLNearbyVoiceModeration::getInstance()->isNearbyChatModerator(); + LLUUID participant_id = participant_model->getUUID(); + if (participant_id != gAgentID) + { + // Don't show moderator options if participant is not connected to the same spatial channel + LLSpeaker* speakerp = speaker_mgr->findSpeaker(participant_id).get(); + show_moderator_options &= speakerp && speakerp->isInVoiceChannel(); + } + participant_model->setModeratorOptionsVisible(show_moderator_options); } current_participant_model++; -- cgit v1.3