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.
meow-7.2.2
Monroe Linden 2010-10-05 16:42:24 -07:00
parent 7a387f2525
commit b285fd4d0a
2 changed files with 20 additions and 10 deletions

View File

@ -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>

View File

@ -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 ( // 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))
)
{
// 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;
}
// silently decline the call
LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
return;
}
}