diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 21 |
2 files changed, 21 insertions, 11 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 04d1137ac8..09f74e5508 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11410,6 +11410,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>VoiceCallsRejectAll</key> + <map> + <key>Comment</key> + <string>Silently reject all incoming voice calls.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>VoiceDisableMic</key> <map> <key>Comment</key> 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; } } |