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,14 +1070,17 @@ private final class NotificationServiceHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let category = aps["category"] as? String {
|
if let category = aps["category"] as? String {
|
||||||
if let _ = aps["r"] {
|
|
||||||
content.category = "r"
|
|
||||||
}
|
|
||||||
if peerId.isGroupOrChannel && ["r", "m"].contains(category) {
|
if peerId.isGroupOrChannel && ["r", "m"].contains(category) {
|
||||||
content.category = "g\(category)"
|
content.category = "g\(category)"
|
||||||
} else {
|
} else {
|
||||||
content.category = category
|
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
|
let _ = messageId
|
||||||
|
|
||||||
@ -1610,7 +1613,7 @@ private final class NotificationServiceHandler {
|
|||||||
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
||||||
var removeIdentifiers: [String] = []
|
var removeIdentifiers: [String] = []
|
||||||
for notification in notifications {
|
for notification in notifications {
|
||||||
if notification.request.content.categoryIdentifier != "r" {
|
if notification.request.content.categoryIdentifier != "t" {
|
||||||
continue
|
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) {
|
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