Merge branch 'DRTVWR-573-maint-R' of https://github.com/secondlife/viewer

# Conflicts:
#	indra/newview/llimprocessing.cpp
#	indra/newview/llimview.cpp
master
Ansariel 2023-03-07 13:20:32 +01:00
commit 50341b9735
7 changed files with 28 additions and 13 deletions

View File

@ -477,6 +477,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>FetchGroupChatHistory</key>
<map>
<key>Comment</key>
<string>Fetch recent messages from group chat servers when a group window opens</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>VoiceCallsFriendsOnly</key>
<map>
<key>Comment</key>

View File

@ -693,7 +693,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
static LLCachedControl<bool> accept_im_from_only_friend(gSavedPerAccountSettings, "VoiceCallsFriendsOnly");
//BOOL is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
// LLMuteList::getInstance()->isLinden(name); <:FS:TM> Bear compie fix - is_linden not referenced
// LLMuteList::isLinden(name); <:FS:TM> Bear compile fix - is_linden not referenced
// <FS:PP> FIRE-10500: Autoresponse for (Away)
static LLCachedControl<bool> FSSendAwayAvatarResponse(gSavedPerAccountSettings, "FSSendAwayAvatarResponse");

View File

@ -3384,7 +3384,7 @@ void LLIMMgr::addMessage(
name_is_setted = true;
}
bool skip_message = false;
bool from_linden = LLMuteList::getInstance()->isLinden(from);
bool from_linden = LLMuteList::isLinden(from);
// <FS:Ansariel> FIRE-14564: VoiceCallFriendsOnly prevents receiving of
//if (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && !from_linden)
if (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && !from_linden &&
@ -3930,7 +3930,7 @@ void LLIMMgr::inviteToSession(
std::string question_type = "VoiceInviteQuestionDefault";
BOOL voice_invite = FALSE;
bool is_linden = LLMuteList::getInstance()->isLinden(caller_name);
bool is_linden = LLMuteList::isLinden(caller_name);
if(type == IM_SESSION_P2P_INVITE)

View File

@ -195,7 +195,7 @@ void LLMuteList::cleanupSingleton()
LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
}
BOOL LLMuteList::isLinden(const std::string& name) const
bool LLMuteList::isLinden(const std::string& name)
{
std::string username = boost::replace_all_copy(name, ".", " ");
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@ -203,9 +203,9 @@ BOOL LLMuteList::isLinden(const std::string& name) const
tokenizer tokens(username, sep);
tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end()) return FALSE;
if (token_iter == tokens.end()) return false;
token_iter++;
if (token_iter == tokens.end()) return FALSE;
if (token_iter == tokens.end()) return false;
std::string last_name = *token_iter;
LLStringUtil::toLower(last_name);

View File

@ -104,7 +104,7 @@ public:
// Alternate (convenience) form for places we don't need to pass the name, but do need flags
BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); };
BOOL isLinden(const std::string& name) const;
static bool isLinden(const std::string& name);
BOOL isLoaded() const { return mIsLoaded; }

View File

@ -2198,7 +2198,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
log_message = LLTrans::getString("InvOfferDecline", log_message_args);
}
chat.mText = log_message;
if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269
if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::isLinden(mFromName) ) // muting for SL-42269
{
chat.mMuted = TRUE;
accept_to_trash = false; // will send decline message
@ -3001,7 +3001,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLMute::flagTextChat)
|| LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat);
is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
LLMuteList::getInstance()->isLinden(from_name);
LLMuteList::isLinden(from_name);
if (is_muted && (chat.mSourceType == CHAT_SOURCE_OBJECT))
{
@ -7394,8 +7394,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
{
count++;
known_questions |= script_perm.permbit;
// check whether permission question should cause special caution dialog
caution |= (script_perm.caution);
if (!LLMuteList::isLinden(owner_name))
{
// check whether permission question should cause special caution dialog
caution |= (script_perm.caution);
}
if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit)
continue;
@ -8066,7 +8070,7 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response)
LLAvatarName av_name;
LLAvatarNameCache::get(from_id, &av_name);
if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(av_name.getUserName()))
if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::isLinden(av_name.getUserName()))
{
return false;
}

View File

@ -4682,7 +4682,7 @@ void LLVivoxVoiceClient::messageEvent(
{
bool is_do_not_disturb = gAgent.isDoNotDisturb();
bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat);
bool is_linden = LLMuteList::getInstance()->isLinden(session->mName);
bool is_linden = LLMuteList::isLinden(session->mName);
LLChat chat;
chat.mMuted = is_muted && !is_linden;