diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2ba8bd7551..f0b61bbf45 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1084,6 +1084,21 @@ LLOfferInfo::LLOfferInfo(const LLSD& sd) mHost = LLHost(sd["sender"].asString()); } +LLOfferInfo::LLOfferInfo(const LLOfferInfo& info) +{ + mIM = info.mIM; + mFromID = info.mFromID; + mFromGroup = info.mFromGroup; + mFromObject = info.mFromObject; + mTransactionID = info.mTransactionID; + mFolderID = info.mFolderID; + mObjectID = info.mObjectID; + mType = info.mType; + mFromName = info.mFromName; + mDesc = info.mDesc; + mHost = info.mHost; +} + LLSD LLOfferInfo::asLLSD() { LLSD sd; @@ -1575,7 +1590,12 @@ void inventory_offer_handler(LLOfferInfo* info) } else // Agent -> Agent Inventory Offer { + payload["reusable"] = true; + p.responder = info; // Note: sets inventory_offer_callback as the callback + // *TODO fix memory leak + // inventory_offer_callback() is not invoked if user received notification and + // closes viewer(without responding the notification) p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); p.name = "UserGiveItem"; @@ -2303,6 +2323,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; + payload["reusable"] = true; LLNotificationsUtil::add("TeleportOffered", args, payload); } } @@ -2371,6 +2392,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { + payload["reusable"] = true; args["[MESSAGE]"] = message; LLNotificationsUtil::add("OfferFriendship", args, payload); } |