summaryrefslogtreecommitdiff
path: root/indra/newview/llchatitemscontainerctrl.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-05-22 20:29:55 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-05-22 20:29:55 +0300
commit0f00dc2f658869cc73a18b03b024a6cc88964e0b (patch)
tree8e8142f9cb61d8a543f164eb18aec9ed1e91c7c5 /indra/newview/llchatitemscontainerctrl.cpp
parent58cf9c5c23c10752b26dcac384b51c85f9407ca6 (diff)
Add support for sending messages to Nearby chat from Lua script
Diffstat (limited to 'indra/newview/llchatitemscontainerctrl.cpp')
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 2b875c708d..8eabe3d222 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -187,6 +187,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
int sType = notification["source"].asInteger();
mSourceType = (EChatSourceType)sType;
+ mIsFromScript = notification["is_lua"].asBoolean();
std::string color_name = notification["text_color"].asString();
@@ -214,7 +215,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
{
std::string str_sender;
- str_sender = fromName;
+ str_sender = mIsFromScript ? LLTrans::getString("ScriptBy") + fromName : fromName;
str_sender+=" ";
@@ -401,7 +402,7 @@ void LLFloaterIMNearbyChatToastPanel::draw()
else if(mSourceType == CHAT_SOURCE_SYSTEM)
icon->setValue(LLSD("SL_Logo"));
else if(mSourceType == CHAT_SOURCE_AGENT)
- icon->setValue(mFromID);
+ icon->setValue(mIsFromScript ? LLSD("Inv_Script") : mFromID);
else if(!mFromID.isNull())
icon->setValue(mFromID);
}