diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2024-08-13 15:48:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 15:48:26 +0300 |
commit | 083212979d3fc0a2dd24fe795950e1d1a2251c73 (patch) | |
tree | b9a9f7057fa1d1438db2b88761fcfd6a248516a5 /indra/newview/lltoastimpanel.cpp | |
parent | ff601107f093e33f70e08a9453ed329e064ce45c (diff) | |
parent | 9f2e322c7eea6830d372943d74f986d299cd314a (diff) |
Merge pull request #2240 from secondlife/lua-groupchat
Lua api for sending group messages
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index f7e2d49e13..b7353d6960 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); |