mirror of
https://github.com/block/buzz.git
synced 2026-11-13 04:41:12 +00:00
Preserve default sound in restricted notification fallback
Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
@@ -101,13 +101,13 @@ final class NotificationService: UNNotificationServiceExtension {
|
||||
) {
|
||||
resolvedScope = nil
|
||||
handoff = BuzzNotificationHandoff(handler: contentHandler)
|
||||
restrictedFallbackContent = Self.restrictedFallback(from: request.content)
|
||||
guard let content = request.content.mutableCopy() as? UNMutableNotificationContent else {
|
||||
finish(request.content)
|
||||
return
|
||||
}
|
||||
// Workaround until https://github.com/block/buzz/pull/8431 lands.
|
||||
if content.sound == nil { content.sound = .default }
|
||||
restrictedFallbackContent = Self.restrictedFallback(from: content)
|
||||
bestAttemptContent = content
|
||||
var cleanUserInfo = content.userInfo
|
||||
cleanUserInfo.removeValue(forKey: BuzzPushNavigationTarget.userInfoKey)
|
||||
|
||||
Reference in New Issue
Block a user