Browse Source

dev push notification

Marino Faggiana 6 years ago
parent
commit
d37abd85e9
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Notification Service Extension/NotificationService.swift

+ 5 - 1
Notification Service Extension/NotificationService.swift

@@ -59,7 +59,11 @@ class NotificationService: UNNotificationServiceExtension {
             do {
                 let json = try JSONSerialization.jsonObject(with: data) as! [String:AnyObject]
                 if let app = json["app"] as? String {
-                    bestAttemptContent.title = app.uppercased()
+                    if app == "spreed" {
+                        bestAttemptContent.title = "Nextcloud Talk"
+                    } else {
+                        bestAttemptContent.title = app.capitalized
+                    }
                 }
                 if let subject = json["subject"] as? String {
                     bestAttemptContent.body = subject