From 9773e06cc12b432772eda856c5281c749caec988 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 21 Aug 2019 16:22:43 +0300 Subject: SL-11753 FIXED Group & Resident with the same name share chat history. --- indra/newview/llimview.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 0f5d514660..c07064389b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -848,7 +848,7 @@ void LLIMModel::LLIMSession::loadHistory() std::list chat_history; //involves parsing of a chat history - LLLogChat::loadChatHistory(mHistoryFileName, chat_history); + LLLogChat::loadChatHistory(mHistoryFileName, chat_history, LLSD(), isGroupChat()); addMessagesFromHistory(chat_history); } } @@ -912,6 +912,11 @@ bool LLIMModel::LLIMSession::isP2P() return IM_NOTHING_SPECIAL == mType; } +bool LLIMModel::LLIMSession::isGroupChat() +{ + return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID)); +} + bool LLIMModel::LLIMSession::isOtherParticipantAvaline() { return !mOtherParticipantIsAvatar; @@ -969,6 +974,10 @@ void LLIMModel::LLIMSession::buildHistoryFileName() mHistoryFileName = LLCacheName::buildUsername(mName); } } + else if (isGroupChat()) + { + mHistoryFileName = mName + GROUP_CHAT_SUFFIX; + } } //static -- cgit v1.2.3