summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2026-04-27 21:59:21 +0300
committerGitHub <noreply@github.com>2026-04-27 21:59:21 +0300
commit9b8648707c233659dededc3d97340046ee4a3caa (patch)
treee048921b41bc289e3dd35f9a7df031ea684d415a
parent72f73ff62a6adef5caf5418a6c7d03a5c9867648 (diff)
#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
-rw-r--r--indra/newview/llfloaterimsessiontab.h2
-rw-r--r--indra/newview/llimview.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index b27ac1b8f9..3ca1187ec9 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -118,6 +118,8 @@ public:
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 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<bool> 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<bool> fetch_chat_history(gSavedPerAccountSettings, "FetchGroupChatHistory", true);
+ if (fetch_chat_history && !im_floater->isP2PSessionType())
{
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
if (!url.empty())