diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2025-12-10 17:37:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-10 17:37:00 +0200 |
| commit | e028a437e9bcc6f102e5d2eaee2b659367f5b0e3 (patch) | |
| tree | 808954be544d9b1b562c5433ab1ed57ac5ad977c /indra/newview | |
| parent | cbe606df6b77780fdecf8bdc4007a52d25ff5722 (diff) | |
#5129 Hide moderator options for participants who are not connected to the same voice space
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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<LLConversationItemParticipant*>((*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++; |
