From aa0706abc43dd5403ef9ea018cbb0698777020eb Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 27 Oct 2020 14:49:40 +0100 Subject: [PATCH] FIRE-9115: Send autorespond messages also when receiving TP offers/requests (but deliberately do not send autorespond inventory items in this case) --- indra/newview/llimprocessing.cpp | 45 +++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 23f75553fb..1fb4b77094 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1781,13 +1781,52 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // else { -// if (is_do_not_disturb) + // FS autoresponse feature + //if (is_do_not_disturb) + //{ + // send_do_not_disturb_message(gMessageSystem, from_id); + //} // [RLVa:KB] - Checked: RLVa-1.4.9 - if ( (is_do_not_disturb) && (!fRlvAutoAccept) ) + if (!fRlvAutoAccept) // [/RLVa:KB] { - send_do_not_disturb_message(gMessageSystem, from_id); + std::string my_name; + std::string response; + LLAgentUI::buildFullname(my_name); + if (is_do_not_disturb) + { + response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse"); + } + else if (is_autorespond_nonfriends && !is_friend) + { + response = gSavedPerAccountSettings.getString("FSAutorespondNonFriendsResponse"); + } + else if (is_autorespond) + { + response = gSavedPerAccountSettings.getString("FSAutorespondModeResponse"); + } + else if (is_afk && FSSendAwayAvatarResponse) + { + response = gSavedPerAccountSettings.getString("FSAwayAvatarResponse"); + } + + if (!response.empty()) + { + pack_instant_message( + gMessageSystem, + gAgentID, + FALSE, + gAgentSessionID, + from_id, + my_name, + response, + IM_ONLINE, + IM_DO_NOT_DISTURB_AUTO_RESPONSE, + LLUUID::null); + gAgent.sendReliableMessage(); + } } + // FS autoresponse feature LLVector3 pos, look_at; U64 region_handle(0);