From 8bce6114b188a9180f6f2a5376773c3efd27f3d8 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Sat, 13 Dec 2025 19:51:16 +0100 Subject: [PATCH] Participants list: add new speakers to the participants list to make moderation tolls and mentions work better --- indra/newview/fsfloaterim.cpp | 17 +++++++++++++++++ indra/newview/llspeakers.cpp | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 2521526440..1125bec1e0 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -1589,6 +1589,23 @@ void FSFloaterIM::updateMessages() S32 is_history = msg["is_history"].asInteger(); bool is_region_msg = msg["is_region_msg"].asBoolean(); + // LL removed updates to the participants list on bigger groups, so at least keep track of + // users who chatted in the group, so mentions and moderatoin tools can work better. This can + // be removed once participants lists work as designed once again. + // See also LLSpeakers::updateSpeakers() for own "has_spoken" extension. -Zi + if (!is_history && !pIMSession->mSpeakers->findSpeaker(from_id)) + { + const std::string& from_id_str = from_id.asString(); + LLSD new_speaker; + new_speaker["session_id"] = mSessionID; + new_speaker["agent_updates"][from_id_str]["transition"] = "ENTER"; + + // add our own flag so the sorting by last chatters works + new_speaker["agent_updates"][from_id_str]["has_spoken"] = true; + + pIMSession->mSpeakers->updateSpeakers(new_speaker); + } + LLChat chat; chat.mFromID = from_id; chat.mSessionID = mSessionID; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index c0aa7db2ca..d43b54c28f 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -763,6 +763,14 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) { // add or update speaker speakerp = setSpeaker(agent_id); + + // add new speakers to participants list + if (agent_data.has("has_spoken")) + { + speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32(); + speakerp->mHasSpoken = true; + } + // } else {