mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Add support for MWI (voicemail) push notifications
This commit is contained in:
parent
4c45a9bb1e
commit
1dbbe6a53d
4 changed files with 12 additions and 1 deletions
|
|
@ -2,6 +2,6 @@ import Foundation
|
||||||
|
|
||||||
public enum AppGitInfo {
|
public enum AppGitInfo {
|
||||||
public static let branch = "master"
|
public static let branch = "master"
|
||||||
public static let commit = "4feae7fcc"
|
public static let commit = "4c45a9bb1"
|
||||||
public static let tag = "6.1.0-alpha"
|
public static let tag = "6.1.0-alpha"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -537,6 +537,8 @@
|
||||||
"uri_handler_config_success_toast" = "Configuration successfully applied";
|
"uri_handler_config_success_toast" = "Configuration successfully applied";
|
||||||
"username" = "Username";
|
"username" = "Username";
|
||||||
"username_error" = "Username error";
|
"username_error" = "Username error";
|
||||||
|
"Voicemail" = "Voicemail";
|
||||||
|
"New message" = "New message";
|
||||||
"web_platform_forgotten_password_url" = "https://subscribe.linphone.org/";
|
"web_platform_forgotten_password_url" = "https://subscribe.linphone.org/";
|
||||||
"web_platform_register_email_url" = "https://subscribe.linphone.org/register/email";
|
"web_platform_register_email_url" = "https://subscribe.linphone.org/register/email";
|
||||||
"website_contact_url" = "https://linphone.org/contact";
|
"website_contact_url" = "https://linphone.org/contact";
|
||||||
|
|
|
||||||
|
|
@ -534,6 +534,8 @@
|
||||||
"uri_handler_config_success_toast" = "Configuration appliquée avec succè";
|
"uri_handler_config_success_toast" = "Configuration appliquée avec succè";
|
||||||
"username" = "Nom d’utilisateur";
|
"username" = "Nom d’utilisateur";
|
||||||
"username_error" = "Erreur dans le nom d'utilisateur";
|
"username_error" = "Erreur dans le nom d'utilisateur";
|
||||||
|
"Voicemail" = "Messagerie vocale";
|
||||||
|
"New message" = "Nouveau message";
|
||||||
"web_platform_forgotten_password_url" = "https://subscribe.linphone.org/";
|
"web_platform_forgotten_password_url" = "https://subscribe.linphone.org/";
|
||||||
"web_platform_register_email_url" = "https://subscribe.linphone.org/register/email";
|
"web_platform_register_email_url" = "https://subscribe.linphone.org/register/email";
|
||||||
"website_contact_url" = "https://linphone.org/contact";
|
"website_contact_url" = "https://linphone.org/contact";
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,13 @@ class NotificationService: UNNotificationServiceExtension {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if let bestAttemptContent = bestAttemptContent {
|
if let bestAttemptContent = bestAttemptContent {
|
||||||
|
if let aps = request.content.userInfo["aps"] as? [String: Any], let alert = aps["alert"] as? [String: Any], let locKey = alert["loc-key"] as? String, locKey == "MWI_NOTIFY_STR" {
|
||||||
|
bestAttemptContent.title = String(localized: "Voicemail")
|
||||||
|
bestAttemptContent.body = String(localized: "New message")
|
||||||
|
contentHandler(bestAttemptContent)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
createCore()
|
createCore()
|
||||||
if !lc!.config!.getBool(section: "app", key: "disable_chat_feature", defaultValue: false) {
|
if !lc!.config!.getBool(section: "app", key: "disable_chat_feature", defaultValue: false) {
|
||||||
Log.info("received push payload : \(bestAttemptContent.userInfo.debugDescription)")
|
Log.info("received push payload : \(bestAttemptContent.userInfo.debugDescription)")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue