🐛 Tries to fix

This commit is contained in:
2025-10-03 22:06:05 +08:00
parent 6df1d96cc9
commit 7db164fda6
3 changed files with 7 additions and 5 deletions

View File

@@ -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",

View File

@@ -12,7 +12,7 @@ import UIKit
UNUserNotificationCenter.current().delegate = notifyDelegate
let replyableMessageCategory = UNNotificationCategory(
identifier: "REPLYABLE_MESSAGE",
identifier: "CHAT_MESSAGE",
actions: [
UNTextInputNotificationAction(
identifier: "reply_action",

View File

@@ -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)
}
})
}