mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Fix notification service
This commit is contained in:
parent
4bc9b2a783
commit
1910536fd6
1 changed files with 13 additions and 2 deletions
|
|
@ -95,6 +95,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
VFSUtil.log("[VFS] Error unable to activate.", .error)
|
||||
}
|
||||
*/
|
||||
|
||||
if let bestAttemptContent = bestAttemptContent {
|
||||
createCore()
|
||||
if !lc!.config!.getBool(section: "app", key: "disable_chat_feature", defaultValue: false) {
|
||||
|
|
@ -197,13 +198,20 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
return
|
||||
} else {
|
||||
Log.info("Message not found for callid ["+callId+"]")
|
||||
stopCore()
|
||||
contentHandler(UNNotificationContent())
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
stopCore()
|
||||
contentHandler(UNNotificationContent())
|
||||
return
|
||||
}
|
||||
} else {
|
||||
stopCore()
|
||||
contentHandler(UNNotificationContent())
|
||||
return
|
||||
}
|
||||
serviceExtensionTimeWillExpire()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -223,15 +231,18 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
let _ = lc?.getNewChatRoomFromConfAddr(chatRoomAddr: chatRoomInviteAddr)
|
||||
stopCore()
|
||||
contentHandler(UNNotificationContent())
|
||||
return
|
||||
} else if let callId = bestAttemptContent.userInfo["call-id"] as? String {
|
||||
stopCore()
|
||||
bestAttemptContent.title = String(localized: "notification_chat_message_received_title")
|
||||
bestAttemptContent.body = NSLocalizedString("IM_MSG", comment: "")
|
||||
|
||||
contentHandler(bestAttemptContent)
|
||||
return
|
||||
} else {
|
||||
stopCore()
|
||||
contentHandler(UNNotificationContent())
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue