From 727d3c8f088bf3997985dd69eeb6ffc16bb98419 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 14 Jan 2010 21:29:53 +0200 Subject: Teleport offers should be recorded to IM history only after they were sent (EXT-4315). --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4e5655274d..bcfd1ea0ad 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5360,8 +5360,24 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) it != notification["payload"]["ids"].endArray(); ++it) { + LLUUID target_id = it->asUUID(); + msg->nextBlockFast(_PREHASH_TargetData); - msg->addUUIDFast(_PREHASH_TargetID, it->asUUID()); + msg->addUUIDFast(_PREHASH_TargetID, target_id); + + // Record the offer. + { + std::string target_name; + gCacheName->getFullName(target_id, target_name); + LLSD args; + args["TO_NAME"] = target_name; + + LLSD payload; + payload["from_id"] = target_id; + payload["SESSION_NAME"] = target_name; + payload["SUPPRESS_TOAST"] = true; + LLNotificationsUtil::add("TeleportOfferSent", args, payload); + } } gAgent.sendReliableMessage(); } -- cgit v1.2.3 From 095041154995bdfd8f82ebd4df88df4f84115218 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 15 Jan 2010 18:47:24 +0200 Subject: EXT-4160 Gesture floater spam when creating new account Cause: There is a global observer ( LLOpenTaskOffer ) which observes creation of new inventory items and open appropriated preview UI for them. Looks like simulator () sends a message for all active gestures, when user is logged in first time. Solution: Displaying of the preview gesture floater has been removed from global scope. Also I have added new observer to handle opening gestures as attachment from group notice to avoid regression problems. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bcfd1ea0ad..4999ac000e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -711,6 +711,18 @@ protected: } }; +class LLOpenTaskGroupOffer : public LLInventoryAddedObserver +{ +protected: + /*virtual*/ void done() + { + open_inventory_offer(mAdded, "group_offer"); + mAdded.clear(); + gInventory.removeObserver(this); + delete this; + } +}; + //one global instance to bind them LLOpenTaskOffer* gNewInventoryObserver=NULL; @@ -929,9 +941,6 @@ void open_inventory_offer(const std::vector& items, const std::string& f case LLAssetType::AT_ANIMATION: LLFloaterReg::showInstance("preview_anim", LLSD(item_id), take_focus); break; - case LLAssetType::AT_GESTURE: - LLFloaterReg::showInstance("preview_gesture", LLSD(item_id), take_focus); - break; case LLAssetType::AT_SCRIPT: LLFloaterReg::showInstance("preview_script", LLSD(item_id), take_focus); break; @@ -1146,6 +1155,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& } break; case IM_GROUP_NOTICE: + opener = new LLOpenTaskGroupOffer; send_auto_receive_response(); break; case IM_TASK_INVENTORY_OFFERED: -- cgit v1.2.3