discourse/app/assets
Sam 7b12be866d
FIX: never skip push notifications (#25099)
* FIX: never skip push notifications

According to Apple, silent push notifications are automatically punished per:

https://developer.apple.com/videos/play/wwdc2022/10098/?time=814

> As mentioned when I showed you the code on how to request a push
> subscription, you must promise that pushes will be user visible.
> Handling a push event is not an invitation for your JavaScript to
> get silent background runtime. Doing so would violate both a user’s
> trust and a user’s battery life. When handling a push event, you are
> in fact required to post a notification to Notification Center.
> Other browsers all have countermeasures against violating the promise
> to make pushes user visible, and so does Safari.
> In the beta build of macOS Ventura, after three push events where you
> fail to post a notification in a timely manner, your site’s push
> subscription will be revoked. You will need to go through the permission
> workflow again.

The isIdle check was causing certain push notifications to be silent

Additionally, the auto dismissal logic was causing delays which may cause
the device to think the push was a silent one.

By removing this we hope to ensure push notification delivery is more robust
and consistent on iOS.
2024-01-03 12:23:04 +11:00
..
images FIX: Use correct location for wizard background image (#24183) 2023-10-31 15:57:47 +00:00
javascripts FIX: never skip push notifications (#25099) 2024-01-03 12:23:04 +11:00
stylesheets FIX: github onebox styles for commits (#25098) 2024-01-02 17:29:56 -05:00