mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix keys
This commit is contained in:
parent
cfe7f43e0d
commit
4b415d87dd
@ -1070,15 +1070,18 @@ private final class NotificationServiceHandler {
|
||||
}
|
||||
|
||||
if let category = aps["category"] as? String {
|
||||
if let _ = aps["r"] {
|
||||
content.category = "r"
|
||||
}
|
||||
if peerId.isGroupOrChannel && ["r", "m"].contains(category) {
|
||||
content.category = "g\(category)"
|
||||
} else {
|
||||
content.category = category
|
||||
}
|
||||
|
||||
if aps["r"] != nil || aps["react_emoji"] != nil {
|
||||
content.category = "t"
|
||||
} else if payloadJson["r"] != nil || payloadJson["react_emoji"] != nil {
|
||||
content.category = "t"
|
||||
}
|
||||
|
||||
let _ = messageId
|
||||
|
||||
/*if (peerId != 0 && messageId != 0 && parsedAttachment != nil && attachmentData != nil) {
|
||||
@ -1610,7 +1613,7 @@ private final class NotificationServiceHandler {
|
||||
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
||||
var removeIdentifiers: [String] = []
|
||||
for notification in notifications {
|
||||
if notification.request.content.categoryIdentifier != "r" {
|
||||
if notification.request.content.categoryIdentifier != "t" {
|
||||
continue
|
||||
}
|
||||
if let peerIdString = notification.request.content.userInfo["peerId"] as? String, let peerIdValue = Int64(peerIdString), let messageIdString = notification.request.content.userInfo["msg_id"] as? String, let messageIdValue = Int32(messageIdString) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user