From 065bde8514ae42f268052e1fbde0c8659d9cef2d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Apr 2021 20:26:53 +0200 Subject: [PATCH] Fix muted avatars without lastname being able to send group invites --- indra/newview/llimprocessing.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 1fb4b77094..df2c2dbcbd 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1280,7 +1280,19 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // group is not blocked, but we still need to check agent that sent the invitation // and we have no agent's id // Note: server sends username "first.last". - is_muted |= LLMuteList::getInstance()->isMuted(name); + // Fix broken mute check for avatars without last name: + // Names without last names are stored with capital first letter + // in the mute list, but they arrive here completely in lower case. + // So we need to change the first letter to upper case in order to + // make the mute check actually work. + //is_muted |= LLMuteList::getInstance()->isMuted(name); + std::string check_name(name); + if (!check_name.empty() && check_name.find('.') == std::string::npos) + { + check_name[0] = toupper(check_name[0]); + } + is_muted |= LLMuteList::getInstance()->isMuted(check_name); + // } if (is_do_not_disturb || is_muted) {