summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2013-01-23 11:59:46 -0500
committerJonathan Yap <none@none>2013-01-23 11:59:46 -0500
commit146f3e639c3576a0113857b7c5f2c51644683851 (patch)
tree0dc95739c7feb9da1bf609c3403263d344eca2dd /indra/newview/llviewermessage.cpp
parent3e3fda589b11d53fceb9bbeed9f0333d88c3816f (diff)
STORM-1838 Do not display unwanted notification.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a2a9b13eb5..69d53e74ab 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2068,7 +2068,40 @@ llwarns << "DBG " << from_name << " " << from_id << llendl;
// Yes
case 0:
{
- LLAvatarActions::offerTeleport(from_id);
+ std::string text = "Join me in ";
+ LLSLURL slurl;
+ LLAgentUI::buildSLURL(slurl);
+ text.append("\r\n").append(slurl.getSLURLString());
+
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_StartLure);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_Info);
+ msg->addU8Fast(_PREHASH_LureType, (U8)0); // sim will fill this in.
+ msg->addStringFast(_PREHASH_Message, text);
+
+ msg->nextBlockFast(_PREHASH_TargetData);
+ msg->addUUIDFast(_PREHASH_TargetID, from_id);
+
+ // Record the offer.
+ std::string target_name;
+ gCacheName->getFullName(from_id, target_name); // for im log filenames
+ LLSD args;
+ args["TO_NAME"] = LLSLURL("agent", from_id, "displayname").getSLURLString();;
+
+ LLSD payload;
+
+ //*TODO please rewrite all keys to the same case, lower or upper
+ payload["from_id"] = from_id;
+ payload["SUPPRESS_TOAST"] = true;
+ LLNotificationsUtil::add("TeleportOfferSent", args, payload);
+
+ // Add the recepient to the recent people list.
+ LLRecentPeople::instance().add(from_id);
+
+ gAgent.sendReliableMessage();
}
break;