From 83c27ec1cf3970ed2074dbad530914004eebc64d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Apr 2026 18:20:00 +0300 Subject: [PATCH 1/2] #5690 fix viewer trying to fetch group chat history for p2p IM --- indra/newview/llfloaterimsessiontab.h | 2 ++ indra/newview/llimview.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h index b27ac1b8f9e..3ca1187ec96 100644 --- a/indra/newview/llfloaterimsessiontab.h +++ b/indra/newview/llfloaterimsessiontab.h @@ -118,6 +118,8 @@ class LLFloaterIMSessionTab virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) override {}; // Stub virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) override {}; // Stub + bool isP2PSessionType() { return mIsP2PChat; } + protected: // callback for click on any items of the visual states menu diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ad01e11d483..95e684d7272 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3253,8 +3253,8 @@ void LLIMMgr::addMessage( return; } - // Fetch group chat history, enabled by default. - if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory")) + // Fetch group chat or ad-hoc history, enabled by default. + if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory") && !session->isP2PSessionType()) { std::string chat_url = gAgent.getRegionCapability("ChatSessionRequest"); if (!chat_url.empty()) @@ -4097,8 +4097,8 @@ class LLViewerChatterBoxSessionStartReply : public LLHTTPNode { im_floater->processSessionUpdate(body["session_info"]); - // Send request for chat history, if enabled. - if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory")) + // Send request for chat history, if enabled. Skip for peer-to-peer IMs. + if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory") && !im_floater->isP2PSessionType()) { std::string url = gAgent.getRegionCapability("ChatSessionRequest"); if (!url.empty()) From 0f9911feeeeebc55cfb2d30fcdfe355ab1050faf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 27 Apr 2026 20:41:17 +0300 Subject: [PATCH 2/2] #5690 cache "FetchGroupChatHistory" setting --- indra/newview/llimview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 95e684d7272..1d3668de923 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3254,7 +3254,8 @@ void LLIMMgr::addMessage( } // Fetch group chat or ad-hoc history, enabled by default. - if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory") && !session->isP2PSessionType()) + static LLCachedControl fetch_chat_history(gSavedPerAccountSettings, "FetchGroupChatHistory", true); + if (fetch_chat_history && !session->isP2PSessionType()) { std::string chat_url = gAgent.getRegionCapability("ChatSessionRequest"); if (!chat_url.empty()) @@ -4098,7 +4099,8 @@ class LLViewerChatterBoxSessionStartReply : public LLHTTPNode im_floater->processSessionUpdate(body["session_info"]); // Send request for chat history, if enabled. Skip for peer-to-peer IMs. - if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory") && !im_floater->isP2PSessionType()) + static LLCachedControl fetch_chat_history(gSavedPerAccountSettings, "FetchGroupChatHistory", true); + if (fetch_chat_history && !im_floater->isP2PSessionType()) { std::string url = gAgent.getRegionCapability("ChatSessionRequest"); if (!url.empty())