From a7ada49b4564434343b481dbff39ffc55f98aef8 Mon Sep 17 00:00:00 2001 From: gwigz Date: Thu, 27 Aug 2026 14:47:24 +0100 Subject: [PATCH] Fix owner name SLURLs in inventory offers The "gave you" message wrapped its whole sender string in , which works upstream because that string is plain text. Ours holds an agent SLURL from the [SL:KB] patch, so LLUrlEntryNoLink matched the lot and the SLURL rendered raw. The object and group names get their own tags now, the way getSanitizedDescription already does it. Co-Authored-By: Claude Opus 5 (1M context) --- indra/newview/llviewermessage.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1a7f674826..0aa6a444ff 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1654,6 +1654,11 @@ void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response) mRespondFunctions[name](notification, response); } +static std::string no_link(const std::string& text) +{ + return "" + text + ""; +} + bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& response) { LLChat chat; @@ -1767,7 +1772,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& //don't spam them if they are getting flooded if (check_offer_throttle(mFromName, true)) { - log_message = "" + chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); + log_message = no_link(chatHistory_string) + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args); @@ -1900,16 +1905,16 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const quot + mFromName + quot + " " + LLTrans::getString("InvOfferOwnedByGroup") + " " + quot + group_name + quot; - chatHistory_string = mFromName + " " + + chatHistory_string = no_link(mFromName) + " " + LLTrans::getString("InvOfferOwnedByGroup") + " " + - quot + group_name + quot; + quot + no_link(group_name) + quot; } else { from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " + quot + mFromName + quot + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup"); - chatHistory_string = mFromName + " " + + chatHistory_string = no_link(mFromName) + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup"); } } @@ -1948,13 +1953,14 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + name_slurl; - chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + name_slurl; + chatHistory_string = no_link(mFromName) + " " + LLTrans::getString("InvOfferOwnedBy") + " " + name_slurl; // [/SL:KB] } } else { - from_string = chatHistory_string = mFromName; + from_string = mFromName; + chatHistory_string = no_link(mFromName); } LLUUID destination; @@ -1996,7 +2002,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const //don't spam user if flooded if (check_offer_throttle(mFromName, true)) { - log_message = "" + chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); + log_message = chatHistory_string + " " + LLTrans::getString("InvOfferGaveYou") + " " + getSanitizedDescription() + LLTrans::getString("."); LLSD args; args["MESSAGE"] = log_message; LLNotificationsUtil::add("SystemMessageTip", args);