mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add more logs
This commit is contained in:
parent
074e87d407
commit
1310237ab5
@ -2013,6 +2013,15 @@ private final class NotificationServiceHandler {
|
|||||||
}
|
}
|
||||||
|> deliverOn(strongSelf.queue)).start(completed: {
|
|> deliverOn(strongSelf.queue)).start(completed: {
|
||||||
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { notifications in
|
||||||
|
let notificationDebugList = notifications.map { notification -> String in
|
||||||
|
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) {
|
||||||
|
return "peerId: \(peerIdValue), messageId: \(messageIdValue)"
|
||||||
|
} else {
|
||||||
|
return "unknown: \(String(describing: notification.request.content.userInfo))"
|
||||||
|
}
|
||||||
|
}.joined(separator: "\n")
|
||||||
|
Logger.shared.log("NotificationService \(episode)", "Filtering delivered notifications: \(notificationDebugList)")
|
||||||
|
|
||||||
var removeIdentifiers: [String] = []
|
var removeIdentifiers: [String] = []
|
||||||
for notification in notifications {
|
for notification in notifications {
|
||||||
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