summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimview.cpp9
-rw-r--r--indra/newview/llimview.h2
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,