From 4f9563b8292188836476ec750e0292e8efa34627 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Sat, 26 Dec 2009 14:24:22 +0200 Subject: Fixed low bug EXT-3543 ("Mute this participant" menu should be disabled for non-connected participants) -- improved condition to validate whether speaker is in voice channel --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 3 ++- indra/newview/llspeakers.cpp | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 479c29f656..e1491b0889 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -589,7 +589,8 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& if (speakerp.notNull()) { // not in voice participants can not be moderated - return speakerp->mStatus != LLSpeaker::STATUS_TEXT_ONLY; + return speakerp->mStatus == LLSpeaker::STATUS_VOICE_ACTIVE + || speakerp->mStatus == LLSpeaker::STATUS_MUTED; } } return false; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 91b417c61f..010dfd1b33 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -615,6 +615,9 @@ private: void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) { + LLPointer speakerp = findSpeaker(speaker_id); + if (!speakerp) return; + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); LLSD data; data["method"] = "mute update"; @@ -623,7 +626,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) data["params"]["agent_id"] = speaker_id; data["params"]["mute_info"] = LLSD::emptyMap(); //current value represents ability to type, so invert - data["params"]["mute_info"]["text"] = !findSpeaker(speaker_id)->mModeratorMutedText; + data["params"]["mute_info"]["text"] = !speakerp->mModeratorMutedText; LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); } -- cgit v1.2.3