diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ab35df1101..360c6be2c6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1636,6 +1636,18 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const return false; } +class LLPostponedOfferNotification: public LLPostponedNotification +{ +protected: + /* virtual */ + void modifyNotificationParams() + { + LLSD substitutions = mParams.substitutions; + substitutions["NAME"] = mName; + mParams.substitutions = substitutions; + } +}; + void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1785,7 +1797,10 @@ void inventory_offer_handler(LLOfferInfo* info) // Inform user that there is a script floater via toast system { payload["give_inventory_notification"] = TRUE; - LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); + LLNotification::Params params(p.name); + params.substitutions = p.substitutions; + params.payload = p.payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, info->mFromID, false); } } } @@ -2557,7 +2572,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; - LLNotificationsUtil::add("TeleportOffered", args, payload); + + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } break; @@ -2626,7 +2645,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { args["[MESSAGE]"] = message; - LLNotificationsUtil::add("OfferFriendship", args, payload); + LLNotification::Params params("OfferFriendship"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } } |