summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index cb5cf4a61d..271ee0c4a4 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -335,7 +335,7 @@ public:
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
- if(mSourceType != CHAT_SOURCE_AGENT)
+ if(mSourceType != CHAT_SOURCE_AGENT || mAvatarID.isNull())
icon->setDrawTooltip(false);
switch (mSourceType)
@@ -790,21 +790,27 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
+ link_params.is_link = true;
link_params.link_href = url;
- mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
+ mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
- link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
+
+ // Setting is_link = true for agent SLURL to avoid applying default style to it.
+ // See LLTextBase::appendTextImpl().
+ link_params.is_link = true;
+ link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
+
// Add link to avatar's inspector and delimiter to message.
- mEditor->appendText(link_params.link_href, false, style_params);
+ mEditor->appendText(chat.mFromName, false, link_params);
mEditor->appendText(delimiter, false, style_params);
}
else
{
- mEditor->appendText(chat.mFromName + delimiter, false, style_params);
+ mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, false, style_params);
}
}
}