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.

master
Mnikolenko Productengine 2020-07-01 16:55:57 +03:00
parent 68450e44fe
commit 562c2bd1ec
2 changed files with 7 additions and 4 deletions

View File

@ -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;
}

View File

@ -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,