From 146f3e639c3576a0113857b7c5f2c51644683851 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 23 Jan 2013 11:59:46 -0500 Subject: STORM-1838 Do not display unwanted notification. --- indra/newview/llviewermessage.cpp | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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; -- cgit v1.2.3