From da40427a0be28de943988a4961c728384a453119 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 16 Jan 2012 14:27:35 -0500 Subject: STORM-1795 Ad-hoc messages are received even when "Only friends and groups can call or IM me" --- indra/newview/llimview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a856bd0bdc..fa7930503b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2458,7 +2458,10 @@ void LLIMMgr::addMessage( make_ui_sound("UISndNewIncomingIMSession"); } - if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat)) + bool show_message = gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && + LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL ? false : true; + + if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && show_message) { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } -- cgit v1.2.3 From d70d57c9387bd94d32cb3e2b71430102f250c6eb Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 20 Jan 2012 14:15:31 -0500 Subject: STORM-1795 Fix logic error --- indra/newview/llimview.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fa7930503b..dbdef9d47b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2458,8 +2458,14 @@ void LLIMMgr::addMessage( make_ui_sound("UISndNewIncomingIMSession"); } - bool show_message = gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && - LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL ? false : true; + bool show_message = true; + if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) + { + if (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL) + { + show_messages = false; + } + } if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && show_message) { -- cgit v1.2.3 From 44436d0240ceeb384d1a2fc05c46ccf1c4034f94 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 20 Jan 2012 14:26:45 -0500 Subject: STORM-1795 Fixed misspelled variable --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index dbdef9d47b..06f57719f5 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2463,7 +2463,7 @@ void LLIMMgr::addMessage( { if (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL) { - show_messages = false; + show_message = false; } } -- cgit v1.2.3 From 9003c4c54b82cfa2517d264e9437aa294aef5bb9 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 23 Jan 2012 17:43:05 -0500 Subject: STORM-1795 Small logic/formatting change --- indra/newview/llimview.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 06f57719f5..f621475193 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2458,16 +2458,10 @@ void LLIMMgr::addMessage( make_ui_sound("UISndNewIncomingIMSession"); } - bool show_message = true; - if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) - { - if (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL) - { - show_message = false; - } - } + bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && + LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); - if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && show_message) + if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); } -- cgit v1.2.3