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