summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-28 15:38:55 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-28 15:38:55 +0000
commitfee014bd82cd78f07bcc88c45109a1ea2b2eee24 (patch)
tree83801b354031134d1fd06ac1894552021ae6afc7 /indra/newview/llchathistory.cpp
parentb3e25e1fbd9cfccc0363cb436ad4302ead974859 (diff)
EXT-4693: Pass through owner ID to remote object inspector.
Plumbing to pass the owner ID for a chatting object down into the LLChatHistory::appendMessage() method where we create the objectim SLapp that will bring up the remote object inspector. Pheww. For object notifications that are displayed as text chat, we
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index fd438001e1..dd9f0c2ebe 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -50,6 +50,8 @@
#include "llslurl.h"
#include "lllayoutstack.h"
#include "llagent.h"
+#include "llviewerregion.h"
+#include "llworld.h"
#include "llsidetray.h"//for blocked objects panel
@@ -491,8 +493,9 @@ void LLChatHistory::clear()
mLastFromID = LLUUID::null;
}
-void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params)
+void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params)
{
+ bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean();
if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty())
{
mUnreadChatSources.insert(chat.mFromName);
@@ -560,9 +563,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if ( chat.mSourceType == CHAT_SOURCE_OBJECT )
{
+ // for object IMs, create a secondlife:///app/objectim SLapp
std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, "");
url += "?name=" + chat.mFromName;
+ url += "&owner=" + args["owner_id"].asString();
+ LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
+ if (region)
+ {
+ S32 x, y, z;
+ LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z);
+ url += "&slurl=" + region->getName() + llformat("/%d/%d/%d", x, y, z);
+ }
+
+ // set the link for the object name to be the objectim SLapp
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
link_params.link_href = url;