summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerchat.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-05-28 22:48:17 +0300
committerGitHub <noreply@github.com>2025-05-28 22:48:17 +0300
commit91adb11d10fe0c18790be64fa7a6ce5b0bbdcb09 (patch)
tree3e5294e3b8ff07778e6134ed9dd41458386032ac /indra/newview/llviewerchat.cpp
parentb9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff)
parentb08ba3fa7bc9e6309891e510fbfb5c4e2b5c922e (diff)
Merge pull request #4183 from secondlife/marchcat/2505-merge
Marchcat/2505 merge
Diffstat (limited to 'indra/newview/llviewerchat.cpp')
-rw-r--r--indra/newview/llviewerchat.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 8b01c4ef88..2ca2c5c07d 100644
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -36,6 +36,7 @@
#include "llviewerregion.h"
#include "llworld.h"
#include "llinstantmessage.h" //SYSTEM_FROM
+#include "llurlregistry.h"
// LLViewerChat
LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal;
@@ -222,6 +223,13 @@ void LLViewerChat::formatChatMsg(const LLChat& chat, std::string& formated_msg)
{
std::string tmpmsg = chat.mText;
+ // show @name instead of slurl for chat mentions
+ LLUrlMatch match;
+ while (LLUrlRegistry::instance().findUrl(tmpmsg, match, LLUrlRegistryNullCallback, false, true))
+ {
+ tmpmsg.replace(match.getStart(), match.getEnd() - match.getStart() + 1, match.getLabel());
+ }
+
if(chat.mChatStyle == CHAT_STYLE_IRC)
{
formated_msg = chat.mFromName + tmpmsg.substr(3);