Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions indra/newview/llfloaterimsessiontab.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions indra/newview/llimview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3253,8 +3253,9 @@ void LLIMMgr::addMessage(
return;
}

// Fetch group chat history, enabled by default.
if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addMessage can be fairly frequent. Not the 'once per frame' frequent, but might be better to cache the setting.

// 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())
Expand Down Expand Up @@ -4097,8 +4098,9 @@ 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.
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())
Expand Down
Loading