summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastimpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r--indra/newview/lltoastimpanel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 42ee30409d..df79af4926 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -87,7 +87,10 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
{
LLAvatarName avatar_name;
LLAvatarNameCache::get(p.avatar_id, &avatar_name);
- p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message;
+ // move Lua prefix from the message field to the [From] field
+ auto [message, is_lua] = LLStringUtil::withoutPrefix(p.message, LUA_PREFIX);
+ std::string prefix = is_lua ? "LUA - " : "";
+ p.message = "[From " + prefix + avatar_name.getDisplayName() + "]\n" + message;
}
style_params.font.style = "NORMAL";
mMessage->setText(p.message, style_params);