From 562c2bd1ec4fe25f4a686f1b7e59ddd78fd90d41 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 1 Jul 2020 16:55:57 +0300 Subject: SL-13525 FIXED If a blocked user is first to chat in a group IM session, that group IM will not open even if unblocked people chat. --- indra/newview/llimview.cpp | 9 ++++++--- indra/newview/llimview.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d5142a4496..ee3cb338e7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2734,7 +2734,7 @@ void LLIMMgr::addMessage( if (LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden) { LL_WARNS() << "Leaving IM session from initiating muted resident " << from << LL_ENDL; - if (!gIMMgr->leaveSession(new_session_id)) + if (!gIMMgr->leaveSession(new_session_id, !session->isGroupSessionType())) { LL_INFOS() << "Session " << new_session_id << " does not exist." << LL_ENDL; } @@ -2964,12 +2964,15 @@ LLUUID LLIMMgr::addSession( return session_id; } -bool LLIMMgr::leaveSession(const LLUUID& session_id) +bool LLIMMgr::leaveSession(const LLUUID& session_id, bool send_leave_msg) { LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); if (!im_session) return false; - LLIMModel::getInstance()->sendLeaveSession(session_id, im_session->mOtherParticipantID); + if (send_leave_msg) + { + LLIMModel::getInstance()->sendLeaveSession(session_id, im_session->mOtherParticipantID); + } gIMMgr->removeSession(session_id); return true; } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 79c831ebb6..3cd808c75c 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -380,7 +380,7 @@ public: * to the server and removes all associated session data * @return false if the session with specified id was not exist */ - bool leaveSession(const LLUUID& session_id); + bool leaveSession(const LLUUID& session_id, bool send_leave_msg = true); void inviteToSession( const LLUUID& session_id, -- cgit v1.2.3