summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-03-06 14:55:11 -0500
committerOz Linden <oz@lindenlab.com>2014-03-06 14:55:11 -0500
commit208d9a2d21d380a33ce8f1a5a75813222965f62e (patch)
tree28482acd047e89b4ba55471eaf9cd82226ed9584 /indra/newview/llviewermessage.cpp
parent43eae437980226d62898c5f6fdb2a068f3b3c49b (diff)
parent3e5fb8a2741677eb08409dc018b5fef686df2e6b (diff)
merge changes for storm-2010
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d1524b74cd..ab31d704bf 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1876,6 +1876,7 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
+ bool bAutoAccept(false);
// Avoid the Accept/Discard dialog if the user so desires. JC
if (gSavedSettings.getBOOL("AutoAcceptNewInventory")
&& (info->mType == LLAssetType::AT_NOTECARD
@@ -1884,8 +1885,7 @@ void inventory_offer_handler(LLOfferInfo* info)
{
// For certain types, just accept the items into the inventory,
// and possibly open them on receipt depending upon "ShowNewInventory".
- info->forceResponse(IOR_ACCEPT);
- return;
+ bAutoAccept = true;
}
// Strip any SLURL from the message display. (DEV-2754)
@@ -1953,7 +1953,7 @@ void inventory_offer_handler(LLOfferInfo* info)
LLNotification::Params p;
// Object -> Agent Inventory Offer
- if (info->mFromObject)
+ if (info->mFromObject && !bAutoAccept)
{
// Inventory Slurls don't currently work for non agent transfers, so only display the object name.
args["ITEM_SLURL"] = msg;
@@ -1999,11 +1999,12 @@ void inventory_offer_handler(LLOfferInfo* info)
send_do_not_disturb_message(gMessageSystem, info->mFromID);
}
- // Inform user that there is a script floater via toast system
+ if( !bAutoAccept ) // if we auto accept, do not pester the user
{
+ // Inform user that there is a script floater via toast system
payload["give_inventory_notification"] = TRUE;
- p.payload = payload;
- LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);
+ p.payload = payload;
+ LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);
}
}