From b8da1259ba9fa9b2afc0a2b6050b147dbf13ccb8 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 21 Oct 2024 16:35:23 -0700 Subject: Issue #2907: Process metadata sent along with chats of type IM_NOTHING_SPECIAL, The metadata can contain information about the bot status of the sender. It may also contain a system-injected notification that is displayed to the agent as part of the 1:1 chat window. --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1402cc8c37..8a54267292 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3143,7 +3143,7 @@ void LLIMMgr::addMessage( const LLUUID& region_id, const LLVector3& position, bool is_region_msg, - U32 timestamp) // May be zero + U32 timestamp) // May be zero { LLUUID other_participant_id = target_id; -- cgit v1.2.3 From 7ff297ec3fc5f878cc9a916678987c0033b7eb8a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 25 Oct 2024 15:52:10 -0700 Subject: Issue #2907: When passing the injected notification message into addMessage on behalf of the system, optionally specify the agent id and name that should be used. --- indra/newview/llimview.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8a54267292..beb32dd6fb 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3143,9 +3143,16 @@ void LLIMMgr::addMessage( const LLUUID& region_id, const LLVector3& position, bool is_region_msg, - U32 timestamp) // May be zero + U32 timestamp, // May be zero + LLUUID display_id, + std::string_view display_name) { LLUUID other_participant_id = target_id; + std::string message_display_name = (display_name.empty()) ? from : std::string(display_name); + if (display_id.isNull() && (display_name.empty())) + { + display_id = other_participant_id; + } LLUUID new_session_id = session_id; if (new_session_id.isNull()) @@ -3241,7 +3248,7 @@ void LLIMMgr::addMessage( } //Play sound for new conversations - if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation"))) + if (!skip_message && !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation"))) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -3255,7 +3262,7 @@ void LLIMMgr::addMessage( if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { - LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg, true, is_region_msg, timestamp); + LLIMModel::instance().addMessage(new_session_id, message_display_name, display_id, msg, true, is_region_msg, timestamp); } // Open conversation floater if offline messages are present -- cgit v1.2.3