From e9d28ee5c19fc0741544ec971f6aa55361d29bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 17 Jan 2020 23:44:41 -0500 Subject: [PATCH] Inventory offers should link offerer avatar/group name --- indra/newview/llviewermessage.cpp | 26 ++++++------------- .../skins/default/xui/en-us/notifications.xml | 21 --------------- 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 63cf75622..2ca2e89b3 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1894,34 +1894,24 @@ void inventory_offer_handler(LLOfferInfo* info, bool is_friend, bool is_owned_by // Name cache callbacks don't store userdata, so can't save // off the LLOfferInfo. Argh. - BOOL name_found = FALSE; payload["from_id"] = info->mFromID; args["OBJECTFROMNAME"] = info->mFromName; args["NAME"] = info->mFromName; if (info->mFromGroup) { - std::string group_name; - if (gCacheName->getGroupName(info->mFromID, group_name)) - { - args["NAME"] = group_name; - name_found = TRUE; - } + args["NAME"] = LLGroupActions::getSLURL(info->mFromID); } else { - std::string full_name; - if (gCacheName->getFullName(info->mFromID, full_name)) - { + std::string full_name = LLAvatarActions::getSLURL(info->mFromID); // [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a // Only filter if the object owner is a nearby agent - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) ) - { - full_name = RlvStrings::getAnonym(full_name); - } -// [/RLVa:KB] - args["NAME"] = full_name; - name_found = TRUE; + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) ) + { + full_name = RlvStrings::getAnonym(full_name); } +// [/RLVa:KB] + args["NAME"] = full_name; } @@ -1931,7 +1921,7 @@ void inventory_offer_handler(LLOfferInfo* info, bool is_friend, bool is_owned_by // Object -> Agent Inventory Offer if (info->mFromObject) { - p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser"; + p.name = "ObjectGiveItem"; } else // Agent -> Agent Inventory Offer { diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index dae28cc5f..7a6485927 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7436,27 +7436,6 @@ An object named [OBJECTFROMNAME] owned by [NAME] has given you a [OBJECTTYPE] na - -An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJECTTYPE] named [OBJECTNAME]. -
-