diff --git a/indra/newview/fspanelblocklist.cpp b/indra/newview/fspanelblocklist.cpp index adc1c8cc73..cb45a75384 100644 --- a/indra/newview/fspanelblocklist.cpp +++ b/indra/newview/fspanelblocklist.cpp @@ -440,7 +440,7 @@ void FSPanelBlockList::showProfile() void FSPanelBlockList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector names) { if (names.empty() || ids.empty()) return; - LLMute mute(ids[0], names[0].getLegacyName(), LLMute::AGENT); + LLMute mute(ids[0], names[0].getUserName(), LLMute::AGENT); LLMuteList::getInstance()->add(mute); showPanelAndSelect(mute.mID); } diff --git a/indra/newview/fsparticipantlist.cpp b/indra/newview/fsparticipantlist.cpp index e292d67a11..b14275e446 100644 --- a/indra/newview/fsparticipantlist.cpp +++ b/indra/newview/fsparticipantlist.cpp @@ -803,10 +803,12 @@ void FSParticipantList::FSParticipantListMenu::toggleMute(const LLSD& userdata, LL_WARNS("Speakers") << "Speaker " << speaker_id << " not found" << LL_ENDL; return; } - LLAvatarListItem* item = dynamic_cast(mParent.mAvatarList->getItemByValue(speaker_id)); - if (NULL == item) return; - name = item->getAvatarName(); + // We should have the name in the cache from the LLAvatarList this is used in combination with + LLAvatarName avname; + if (!LLAvatarNameCache::get(speaker_id, &avname)) return; + + name = avname.getUserName(); LLMute::EType mute_type; switch (speakerp->mType) diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 6401d8586e..6e14862044 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -737,7 +737,7 @@ void LLInspectAvatar::onClickShare() void LLInspectAvatar::onToggleMute() { - LLMute mute(mAvatarID, mAvatarName.getDisplayName(), LLMute::AGENT); + LLMute mute(mAvatarID, mAvatarName.getUserName(), LLMute::AGENT); if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName)) {