mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 09:49:26 +00:00
Do not display missed call notfication when call has been accepted or declined elsewhere
This commit is contained in:
parent
ccf81cc962
commit
84a845e8ed
2 changed files with 12 additions and 2 deletions
|
|
@ -841,7 +841,17 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char
|
|||
data->timer = nil;
|
||||
}
|
||||
LinphoneCallLog *UNlog = linphone_call_get_call_log(call);
|
||||
if (UNlog == NULL || linphone_call_log_get_status(UNlog) == LinphoneCallMissed) {
|
||||
BOOL notAnsweredElsewhere = TRUE;
|
||||
const LinphoneErrorInfo *ei = linphone_call_get_error_info(call);
|
||||
if (ei) {
|
||||
// error not between 200-299 or 600-699
|
||||
int code = linphone_error_info_get_protocol_code(ei);
|
||||
notAnsweredElsewhere = !((code >= 200 && code < 300) || (code >= 600 && code < 700));
|
||||
}
|
||||
if ((UNlog == NULL || linphone_call_log_get_status(UNlog) == LinphoneCallMissed ||
|
||||
linphone_call_log_get_status(UNlog) == LinphoneCallAborted ||
|
||||
linphone_call_log_get_status(UNlog) == LinphoneCallEarlyAborted) &&
|
||||
notAnsweredElsewhere) {
|
||||
UNMutableNotificationContent *missed_content = [[UNMutableNotificationContent alloc] init];
|
||||
missed_content.title = NSLocalizedString(@"Missed call", nil);
|
||||
missed_content.body = address;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 329821b54904e6ab5c912107deea543f91e7903d
|
||||
Subproject commit 8469ebcfc2aadad6783ba9b8ca17d19e44f1a477
|
||||
Loading…
Add table
Reference in a new issue