mirror of
https://github.com/block/buzz.git
synced 2026-10-28 04:51:40 +00:00
fix(ios): supply missing push notification sound at handoff (#8443)
Temporarily default missing notification sound until the [gateway fix](https://github.com/block/buzz/pull/8431) is deployed. Preserve any sound already provided by APNs. ### Validation Final build 10151: automation verified the push banner on a real iPhone 12 mini against the unchanged staging gateway, and Tom confirmed hearing the sound. iOS build, two existing handoff tests, and normal pre-push passed. ### Before merge - [x] Verify notification delivery and sound on the final iPhone build. Replaces [#8429](https://github.com/block/buzz/pull/8429) with the identical commit to obtain a fresh owner review. The prior review requested tests; this temporary workaround intentionally adds no tests or helper at the author's request. [Prior review response](https://github.com/block/buzz/pull/8429#issuecomment-6256498498). --------- Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
@@ -101,11 +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