Preserve default sound in restricted notification fallback

Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
Tom Brow
2026-10-18 16:13:26 -07:00
parent a660019997
commit 93a435284b

View File

@@ -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)