summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-01-29 17:47:34 -0800
committerMerov Linden <merov@lindenlab.com>2013-01-29 17:47:34 -0800
commitdf84e3c1876c5d2b321f0a8596e7e2a936073156 (patch)
tree301440e9c0e6815ee2a87f5c90ddd58e06b0fe5a /indra/newview
parentacd28e28bc6ff48789ba321a470f05f7162ddd46 (diff)
CHUI-436 : Fixed : Do not skip yourself or group chat when checked Only friends and groups can call or IM me pref.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 8f010850f7..4a1b15f82b 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2610,8 +2610,15 @@ void LLIMMgr::addMessage(
}
}
- bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") &&
- LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL);
+ bool skip_message = false;
+ if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
+ {
+ // Evaluate if we need to skip this message when that setting is true (default is false)
+ LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
+ skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends...
+ skip_message &= !session->isGroupSessionType(); // Do not skip group chats...
+ skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself
+ }
if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message)
{