Fix a few cases where the avatar username wasn't used to create a mute in the mutelist

meow-7.2.2
Ansariel 2022-08-04 22:36:33 +02:00
parent 30545a1cb4
commit 21587fe4f6
3 changed files with 7 additions and 5 deletions

View File

@ -440,7 +440,7 @@ void FSPanelBlockList::showProfile()
void FSPanelBlockList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> 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);
}

View File

@ -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<LLAvatarListItem*>(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)

View File

@ -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))
{