summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-05-06 10:09:24 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-05-06 10:09:24 +0300
commit00360bb1cd28715e2b55b8d92db690a2e3d872e2 (patch)
treed4cf2ee505e2b80e8f402c18de4f517f0de9c56a /indra/newview/llviewermessage.cpp
parent140c576c37e365bd1a616ae6eca1b7ce9f77ffab (diff)
EXT-7097 FIXED
Replaced usage usage of "ObjectGiveItemUnknownUser" notification with functionality provided by LLPostponedNotification class; reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/345/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 5dd9623955..46adb0a46b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1237,7 +1237,6 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
bool matches(const LLNotificationPtr notification) const
{
if(notification->getName() == "ObjectGiveItem"
- || notification->getName() == "ObjectGiveItemUnknownUser"
|| notification->getName() == "UserGiveItem")
{
return (notification->getPayload()["from_id"].asUUID() == blocked_id);
@@ -1700,7 +1699,6 @@ void LLOfferInfo::initRespondFunctionMap()
if(mRespondFunctions.empty())
{
mRespondFunctions["ObjectGiveItem"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
- mRespondFunctions["ObjectGiveItemUnknownUser"] = boost::bind(&LLOfferInfo::inventory_task_offer_callback, this, _1, _2);
mRespondFunctions["UserGiveItem"] = boost::bind(&LLOfferInfo::inventory_offer_callback, this, _1, _2);
}
}
@@ -1771,30 +1769,6 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
- // Name cache callbacks don't store userdata, so can't save
- // off the LLOfferInfo. Argh.
- BOOL name_found = FALSE;
- if (info->mFromGroup)
- {
- std::string group_name;
- if (gCacheName->getGroupName(info->mFromID, group_name))
- {
- args["FIRST"] = group_name;
- args["LAST"] = "";
- name_found = TRUE;
- }
- }
- else
- {
- std::string first_name, last_name;
- if (gCacheName->getName(info->mFromID, first_name, last_name))
- {
- args["FIRST"] = first_name;
- args["LAST"] = last_name;
- name_found = TRUE;
- }
- }
-
// If mObjectID is null then generate the object_id based on msg to prevent
// multiple creation of chiclets for same object.
LLUUID object_id = info->mObjectID;
@@ -1823,9 +1797,9 @@ void inventory_offer_handler(LLOfferInfo* info)
// Note: sets inventory_task_offer_callback as the callback
p.substitutions(args).payload(payload).functor.responder(LLNotificationResponderPtr(info));
info->mPersist = true;
- p.name = name_found ? "ObjectGiveItem" : "ObjectGiveItemUnknownUser";
+ p.name = "ObjectGiveItem";
// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
- LLNotifications::instance().add(p);
+ LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == TRUE);
}
else // Agent -> Agent Inventory Offer
{