summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-10-05 16:42:24 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-10-05 16:42:24 -0700
commitb285fd4d0abf9113fc416c30ac115db06c9f2ebf (patch)
treef98d1d8abc6ecc8db135548b2010c3b2e7f1815f /indra/newview/llimview.cpp
parent7a387f25250cc8cfc3b62c4ae845d1a67f4990b3 (diff)
Fix for EXP-131 "Call dialog shown in locked position when a Resident calls a Skylight visitor"
Added the setting VoiceCallsRejectAll, which causes the viewer to silently reject all incoming voice calls. Reviewed by Callum.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 01e1c3caa0..6b4e1f7289 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2571,17 +2571,16 @@ void LLIMMgr::inviteToSession(
if (type == IM_SESSION_P2P_INVITE || ad_hoc_invite)
{
- // is the inviter a friend?
- if (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)
- {
- // if not, and we are ignoring voice invites from non-friends
- // then silently decline
- if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
- {
- // invite not from a friend, so decline
- LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
- return;
- }
+
+ if ( // if we're rejecting all incoming call requests
+ gSavedSettings.getBOOL("VoiceCallsRejectAll")
+ // or we're rejecting non-friend voice calls and this isn't a friend
+ || (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL))
+ )
+ {
+ // silently decline the call
+ LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
+ return;
}
}