🐛 Tries to fix
This commit is contained in:
@@ -366,7 +366,6 @@
|
||||
"authFactorSecretHint": "Create an secret for this factor.",
|
||||
"authFactorQrCodeScan": "Scan this QR code with your authenticator app to set up TOTP authentication",
|
||||
"authFactorNoQrCode": "No QR code available for this authentication factor",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"authFactorAdditional": "One more step",
|
||||
"authFactorHint": "Contact method hint",
|
||||
@@ -1116,7 +1115,6 @@
|
||||
"thisWillBeAnOpenGift": "This will be an open gift",
|
||||
"personalMessage": "Personal Message",
|
||||
"addPersonalMessageForRecipient": "Add a personal message for the recipient",
|
||||
"copy": "Copy",
|
||||
"cancel": "Cancel",
|
||||
"giftStatusCreated": "Created",
|
||||
"giftStatusSent": "Sent",
|
||||
|
@@ -12,7 +12,7 @@ import UIKit
|
||||
UNUserNotificationCenter.current().delegate = notifyDelegate
|
||||
|
||||
let replyableMessageCategory = UNNotificationCategory(
|
||||
identifier: "REPLYABLE_MESSAGE",
|
||||
identifier: "CHAT_MESSAGE",
|
||||
actions: [
|
||||
UNTextInputNotificationAction(
|
||||
identifier: "reply_action",
|
||||
|
@@ -47,7 +47,6 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
private func processNotification(request: UNNotificationRequest, content: UNMutableNotificationContent) throws {
|
||||
switch content.userInfo["type"] as? String {
|
||||
case "messages.new":
|
||||
content.categoryIdentifier = "REPLYABLE_MESSAGE"
|
||||
try handleMessagingNotification(request: request, content: content)
|
||||
default:
|
||||
try handleDefaultNotification(content: content)
|
||||
@@ -89,7 +88,12 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
let intent = self.createMessageIntent(with: sender, meta: metaCopy, body: content.body)
|
||||
self.donateInteraction(for: intent)
|
||||
let updatedContent = try? request.content.updating(from: intent)
|
||||
self.contentHandler?(updatedContent ?? content)
|
||||
if let updatedContent = updatedContent {
|
||||
updatedContent.categoryIdentifier = "CHAT_MESSAGE"
|
||||
self.contentHandler?(updatedContent)
|
||||
} else {
|
||||
self.contentHandler?(content)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user