diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b8d9e0d784..335fa4387c 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -17151,5 +17151,16 @@ Change of this parameter will affect the layout of buttons in notification toast
1
+ FSUseLegacyInventoryAcceptMessages
+
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 7708293b97..5fc7f361e2 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1484,6 +1484,33 @@ void LLOfferInfo::send_auto_receive_response(void)
}
}
+// Optional V1-like inventory accept messages
+void LLOfferInfo::send_decline_response(void)
+{
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_MessageBlock);
+ msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addUUIDFast(_PREHASH_ToAgentID, mFromID);
+ msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
+ msg->addUUIDFast(_PREHASH_ID, mTransactionID);
+ msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
+ std::string name;
+ LLAgentUI::buildFullname(name);
+ msg->addStringFast(_PREHASH_FromAgentName, name);
+ msg->addStringFast(_PREHASH_Message, "");
+ msg->addU32Fast(_PREHASH_ParentEstateID, 0);
+ msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
+ msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
+ msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 2));
+ msg->addBinaryDataFast(_PREHASH_BinaryBucket, EMPTY_BINARY_BUCKET, EMPTY_BINARY_BUCKET_SIZE);
+ msg->sendReliable(mHost);
+}
+// Optional V1-like inventory accept messages
+
void LLOfferInfo::handleRespond(const LLSD& notification, const LLSD& response)
{
initRespondFunctionMap();
@@ -1577,6 +1604,13 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
opener = open_agent_offer;
}
}
+
+ // Optional V1-like inventory accept messages
+ if (gSavedSettings.getBOOL("FSUseLegacyInventoryAcceptMessages"))
+ {
+ send_auto_receive_response();
+ }
+ // Optional V1-like inventory accept messages
}
break;
case IM_GROUP_NOTICE:
@@ -1639,6 +1673,12 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
opener = discard_agent_offer;
}
+ // Optional V1-like inventory accept messages
+ if (gSavedSettings.getBOOL("FSUseLegacyInventoryAcceptMessages"))
+ {
+ send_decline_response();
+ }
+ // Optional V1-like inventory accept messages
if (busy && (!mFromGroup && !mFromObject))
{
@@ -2088,7 +2128,14 @@ void inventory_offer_handler(LLOfferInfo* info)
}
// In viewer 2 we're now auto receiving inventory offers and messaging as such (not sending reject messages).
- info->send_auto_receive_response();
+ // Optional V1-like inventory accept messages
+ //info->send_auto_receive_response();
+ // Also needs to be send on auto-accept so the item gets into the inventory!
+ if (bAutoAccept || !gSavedSettings.getBOOL("FSUseLegacyInventoryAcceptMessages"))
+ {
+ info->send_auto_receive_response();
+ }
+ // Optional V1-like inventory accept messages
if( !bAutoAccept ) // Nicky D. if we auto accept, do not pester the user with stuff in the chicklet.
// Inform user that there is a script floater via toast system
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index af8bd496df..cbe1846019 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -235,6 +235,8 @@ public:
/*virtual*/ void handleRespond(const LLSD& notification, const LLSD& response);
void send_auto_receive_response(void);
+ // Optional V1-like inventory accept messages
+ void send_decline_response(void);
// TODO - replace all references with handleRespond()
bool inventory_offer_callback(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
index 10b4d11674..a3613eb1f3 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
@@ -18,6 +18,7 @@
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index e153285c64..24763abd57 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -107,13 +107,24 @@
+
+