diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-07-06 11:31:02 +0300 | 
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-07-06 11:31:02 +0300 | 
| commit | c38199451ba9a309909f5d8df4499358b9d6ad53 (patch) | |
| tree | c6b167eb1a8d1a3b4bcc527facac8ef9e852c008 | |
| parent | 49bafc585dfe1504bb39831ff5106eef5ae21c43 (diff) | |
SL-13529 FIXED CHUI floater switches IMs (Local chat to group IM to another group IM)
| -rw-r--r-- | indra/newview/llimview.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llimview.h | 2 | 
2 files changed, 12 insertions, 7 deletions
| diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ee3cb338e7..d67a6ad93e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2693,6 +2693,14 @@ void LLIMMgr::addMessage(  	bool new_session = !hasSession(new_session_id);  	if (new_session)  	{ +		// Group chat session was initiated by muted resident, do not start this session viewerside +		// do not send leave msg either, so we are able to get group messages from other participants +		if ((IM_SESSION_INVITE == dialog) && gAgent.isInGroup(new_session_id) && +			LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !from_linden) +		{ +			return; +		} +  		LLAvatarName av_name;  		if (LLAvatarNameCache::get(other_participant_id, &av_name) && !name_is_setted)  		{ @@ -2734,7 +2742,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, !session->isGroupSessionType())) +				if (!gIMMgr->leaveSession(new_session_id))  				{  					LL_INFOS() << "Session " << new_session_id << " does not exist." << LL_ENDL;  				} @@ -2964,15 +2972,12 @@ LLUUID LLIMMgr::addSession(  	return session_id;  } -bool LLIMMgr::leaveSession(const LLUUID& session_id, bool send_leave_msg) +bool LLIMMgr::leaveSession(const LLUUID& session_id)  {  	LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id);  	if (!im_session) return false; -	if (send_leave_msg) -	{ -		LLIMModel::getInstance()->sendLeaveSession(session_id, im_session->mOtherParticipantID); -	} +	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 3cd808c75c..79c831ebb6 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 send_leave_msg = true); +	bool leaveSession(const LLUUID& session_id);  	void inviteToSession(  		const LLUUID& session_id,  | 
