From 0191ee5f6f96eafa20e838ee1737eea58dafb1de Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 17 Aug 2022 14:50:03 +0300 Subject: SL-17973 FIXED region name is not shown in the IM chat --- indra/newview/llimview.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b7e0a6a794..c3131a513a 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -771,7 +771,7 @@ void LLIMModel::LLIMSession::sessionInitReplyReceived(const LLUUID& new_session_ } } -void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time, const bool is_history) +void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time, const bool is_history, bool is_region_msg) { LLSD message; message["from"] = from; @@ -780,6 +780,7 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, const LLUUID& f message["time"] = time; message["index"] = (LLSD::Integer)mMsgs.size(); message["is_history"] = is_history; + message["is_region_msg"] = is_region_msg; mMsgs.push_front(message); @@ -1148,7 +1149,7 @@ void LLIMModel::sendNoUnreadMessages(const LLUUID& session_id) mNoUnreadMsgsSignal(arg); } -bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { +bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool is_region_msg) { LLIMSession* session = findIMSession(session_id); @@ -1158,7 +1159,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, return false; } - session->addMessage(from, from_id, utf8_text, LLLogChat::timestamp(false)); //might want to add date separately + session->addMessage(from, from_id, utf8_text, LLLogChat::timestamp(false), false, is_region_msg); //might want to add date separately return true; } @@ -1196,9 +1197,9 @@ bool LLIMModel::proccessOnlineOfflineNotification( } bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) { + const std::string& utf8_text, bool log2file, bool is_region_msg) { - LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); + LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file, is_region_msg); if (!session) return false; //good place to add some1 to recent list @@ -1223,7 +1224,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co } LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, - const std::string& utf8_text, bool log2file /* = true */) + const std::string& utf8_text, bool log2file, bool is_region_msg) { LLIMSession* session = findIMSession(session_id); @@ -1239,7 +1240,7 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, from_name = SYSTEM_FROM; } - addToHistory(session_id, from_name, from_id, utf8_text); + addToHistory(session_id, from_name, from_id, utf8_text, is_region_msg); if (log2file) { logToFile(getHistoryFileName(session_id), from_name, from_id, utf8_text); @@ -2695,7 +2696,7 @@ void LLIMMgr::addMessage( U32 parent_estate_id, const LLUUID& region_id, const LLVector3& position, - bool link_name) // If this is true, then we insert the name and link it to a profile + bool is_region_msg) { LLUUID other_participant_id = target_id; @@ -2767,7 +2768,7 @@ void LLIMMgr::addMessage( //<< "*** region_id: " << region_id << std::endl //<< "*** position: " << position << std::endl; - LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, bonus_info.str()); + LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, bonus_info.str(), true, is_region_msg); } // Logically it would make more sense to reject the session sooner, in another area of the @@ -2797,7 +2798,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); + LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg, true, is_region_msg); } // Open conversation floater if offline messages are present -- cgit v1.2.3 From 8e8c68720b936a3bd7e907639a966918d48e57bc Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 17 Aug 2022 20:12:09 +0300 Subject: SL-17973 updated inappropriate arg --- indra/newview/llimview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c3131a513a..0dea11ce66 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3725,8 +3725,7 @@ public: IM_SESSION_INVITE, message_params["parent_estate_id"].asInteger(), message_params["region_id"].asUUID(), - ll_vector3_from_sd(message_params["position"]), - true); + ll_vector3_from_sd(message_params["position"])); if (LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)) { -- cgit v1.2.3 From 91f9f2e9f789d0418107ed5d428e8f0be3a060e2 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 27 Oct 2022 23:08:09 +0300 Subject: DRTVWR-570 Mac build fix: unused variables cleanup --- indra/newview/llimview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4d6ebf9cbb..afd68a6a38 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2114,8 +2114,6 @@ void LLOutgoingCallDialog::show(const LLSD& key) std::string callee_name = mPayload["session_name"].asString(); - LLUUID session_id = mPayload["session_id"].asUUID(); - if (callee_name == "anonymous") // obsolete? Likely was part of avaline support { callee_name = getString("anonymous"); @@ -2499,7 +2497,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload } } - LLUUID new_session_id = gIMMgr->addSession(correct_session_name, type, session_id, true); + gIMMgr->addSession(correct_session_name, type, session_id, true); std::string url = gAgent.getRegion()->getCapability( "ChatSessionRequest"); @@ -2585,7 +2583,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) } else { - LLUUID new_session_id = gIMMgr->addSession( + gIMMgr->addSession( payload["session_name"].asString(), type, session_id, true); -- cgit v1.2.3