mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 09:09:21 +00:00
Fix incoming call with video option by notification
This commit is contained in:
parent
a560a0ab85
commit
d0aa3595ba
2 changed files with 6 additions and 4 deletions
|
|
@ -361,13 +361,13 @@
|
|||
[self fixRing];
|
||||
|
||||
if ([notification.userInfo objectForKey:@"callId"] != nil) {
|
||||
BOOL auto_answer = TRUE;
|
||||
BOOL bypass_incoming_view = TRUE;
|
||||
// some local notifications have an internal timer to relaunch themselves at specified intervals
|
||||
if ([[notification.userInfo objectForKey:@"timer"] intValue] == 1) {
|
||||
[LinphoneManager.instance cancelLocalNotifTimerForCallId:[notification.userInfo objectForKey:@"callId"]];
|
||||
auto_answer = [LinphoneManager.instance lpConfigBoolForKey:@"autoanswer_notif_preference"];
|
||||
bypass_incoming_view = [LinphoneManager.instance lpConfigBoolForKey:@"autoanswer_notif_preference"];
|
||||
}
|
||||
if (auto_answer) {
|
||||
if (bypass_incoming_view) {
|
||||
[LinphoneManager.instance acceptCallForCallId:[notification.userInfo objectForKey:@"callId"]];
|
||||
}
|
||||
} else if ([notification.userInfo objectForKey:@"from_addr"] != nil) {
|
||||
|
|
|
|||
|
|
@ -1611,7 +1611,9 @@ static int comp_call_id(const LinphoneCall *call, const char *callid) {
|
|||
MSList *calls = (MSList *)linphone_core_get_calls(theLinphoneCore);
|
||||
MSList *call = ms_list_find_custom(calls, (MSCompareFunc)comp_call_id, [callid UTF8String]);
|
||||
if (call != NULL) {
|
||||
[self acceptCall:(LinphoneCall *)call->data evenWithVideo:YES];
|
||||
const LinphoneVideoPolicy *video_policy = linphone_core_get_video_policy(theLinphoneCore);
|
||||
bool with_video = video_policy->automatically_accept;
|
||||
[self acceptCall:(LinphoneCall *)call->data evenWithVideo:with_video];
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue