Фикс: пуш-уведомления — убраны кастомные in-app баннеры, Desktop-active suppression, NSE timeout safety
This commit is contained in:
@@ -260,7 +260,15 @@ final class NotificationService: UNNotificationServiceExtension {
|
||||
|
||||
override func serviceExtensionTimeWillExpire() {
|
||||
if let handler = contentHandler, let content = bestAttemptContent {
|
||||
content.sound = .default
|
||||
// Read pushes must stay silent even on timeout — no sound, no alert.
|
||||
let pushType = content.userInfo["type"] as? String ?? ""
|
||||
if pushType == "read" {
|
||||
content.sound = nil
|
||||
content.title = ""
|
||||
content.body = ""
|
||||
} else {
|
||||
content.sound = .default
|
||||
}
|
||||
handler(content)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user