From 9b8648707c233659dededc3d97340046ee4a3caa Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 27 Apr 2026 21:59:21 +0300 Subject: #5690 fix viewer trying to fetch group chat history for p2p IM * #5690 fix viewer trying to fetch group chat history for p2p IM * #5690 cache "FetchGroupChatHistory" setting --- indra/newview/llimview.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ad01e11d48..1d3668de92 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3253,8 +3253,9 @@ 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. + 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()) @@ -4097,8 +4098,9 @@ public: { 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. + static LLCachedControl fetch_chat_history(gSavedPerAccountSettings, "FetchGroupChatHistory", true); + if (fetch_chat_history && !im_floater->isP2PSessionType()) { std::string url = gAgent.getRegionCapability("ChatSessionRequest"); if (!url.empty()) -- cgit v1.3