diff options
-rw-r--r-- | indra/newview/llavataractions.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 18 |
2 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index c3deb602ee..40c9bb6afa 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -172,24 +172,6 @@ void LLAvatarActions::offerTeleport(const std::vector<LLUUID>& ids) return; handle_lure(ids); - - // Record the offer. - for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++) - { - LLUUID target_id = *it; - 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); - } } // static 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(); } |