Teleport offers should be recorded to IM history only after they were sent (EXT-4315).

--HG--
branch : product-engine
meow-7.2.2
Vadim Savchuk 2010-01-14 21:29:53 +02:00
parent 0969315be4
commit 727d3c8f08
2 changed files with 17 additions and 19 deletions

View File

@ -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

View File

@ -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();
}