summaryrefslogtreecommitdiff
path: root/indra/newview/llimprocessing.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2024-10-23 11:31:29 -0700
committerRider Linden <rider@lindenlab.com>2024-10-23 11:31:29 -0700
commit1f4b1dc174625d32bfdbd0e93847bd478f06f47f (patch)
treeb06f518ab934f89fa2545780254fe4784a521750 /indra/newview/llimprocessing.cpp
parentb8da1259ba9fa9b2afc0a2b6050b147dbf13ccb8 (diff)
Issue #2907: Code review comments.
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r--indra/newview/llimprocessing.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 5d1317f00f..f5b149335b 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -453,7 +453,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
LLMuteList::isLinden(name);
/***
- * The simulator has flagged this sender as a bot, if the viewer would like to display
+ * The simulator may have flagged this sender as a bot, if the viewer would like to display
* the chat text in a different color or font, the below code is how the viewer can
* tell if the sender is a bot.
*-----------------------------------------------------
@@ -465,14 +465,12 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
*-----------------------------------------------------
*/
- bool is_system_notice = false;
- std::string notice_id;
+ std::string notice_name;
LLSD notice_args;
if (metadata.has("notice"))
{ // The server has injected a notice into the IM conversation.
// These will be things like bot notifications, etc.
- is_system_notice = true;
- notice_id = metadata["notice"]["id"].asString();
+ notice_name = metadata["notice"]["id"].asString();
notice_args = metadata["notice"]["data"];
}
@@ -605,10 +603,10 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
}
- if (is_system_notice)
+ if (!notice_name.empty())
{ // The simulator has injected some sort of notice into the conversation.
// findString will only replace the contents of buffer if the notice_id is found.
- LLTrans::findString(buffer, notice_id, notice_args);
+ LLTrans::findString(buffer, notice_name, notice_args);
name = SYSTEM_FROM;
from_id = LLUUID::null;
}