From def61c6999f83cc3c85cdccb6ac9f744c032c694 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 28 May 2010 13:28:05 -0700 Subject: removing deprecated add friend callback path for server 1.24 --- indra/newview/llavataractions.cpp | 34 +++------------------- indra/newview/llavataractions.h | 1 - .../newview/skins/default/xui/en/notifications.xml | 14 --------- 3 files changed, 4 insertions(+), 45 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 6534f7921c..89711de6f0 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -81,22 +81,13 @@ void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::strin } LLSD args; - args["NAME"] = LLSLURL("agent", id, "inspect").getSLURLString(); + args["NAME"] = LLSLURL("agent", id, "completename").getSLURLString(); LLSD payload; payload["id"] = id; payload["name"] = name; - // Look for server versions like: Second Life Server 1.24.4.95600 - if (gLastVersionChannel.find(" 1.24.") != std::string::npos) - { - // Old and busted server version, doesn't support friend - // requests with messages. - LLNotificationsUtil::add("AddFriend", args, payload, &callbackAddFriend); - } - else - { - LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); - } - + + LLNotificationsUtil::add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage); + // add friend to recent people list LLRecentPeople::instance().add(id); } @@ -716,23 +707,6 @@ bool LLAvatarActions::handleUnfreeze(const LLSD& notification, const LLSD& respo } return false; } -// static -bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option == 0) - { - // Servers older than 1.25 require the text of the message to be the - // calling card folder ID for the offering user. JC - LLUUID calling_card_folder_id = - gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - std::string message = calling_card_folder_id.asString(); - requestFriendship(notification["payload"]["id"].asUUID(), - notification["payload"]["name"].asString(), - message); - } - return false; -} // static void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message) diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index d106a83eea..2d69c01ffe 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -184,7 +184,6 @@ public: private: - static bool callbackAddFriend(const LLSD& notification, const LLSD& response); static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); static bool handleRemove(const LLSD& notification, const LLSD& response); static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 904084cfa7..5bae6271be 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2006,20 +2006,6 @@ Unable to buy land for the group: You do not have permission to buy land for your active group. - -Friends can give permissions to track each other on the map and receive online status updates. - -Offer friendship to [NAME]? - - -