During initial onboarding, I’ve observed that iOS users will install the forums as a PWA and then receive the notification consent banner when they first open the PWA.
If they click “enable notifications” in this consent banner, they are prompted for permissions and the confirmation notification is sent to them afterwards.
However, this does not actually subscribe users for push notifications, which is unexpected!
It appears that for the notification consent banner, the code here will go down the else path first to request user consent (Notification.requestPermission) but it will NOT subscribe to push notifications (subscribePushNotification).
The workaround at this point is for users to go to their notification preferences and click the “enable notifications” button there.
I’ve done some more work on that PR since posting it - hopefully it won’t be too much
I think this’ll substantially improve Discourse’s integration with WebPush, and it should give y’all an extension point that you can use to prod iOS users to install Discourse as a PWA.
I’ve deployed that change to my forums and it is now live.
I think this’ll really increase participation from my users
I’ve asked someone to check my forums and have confirmed that they were asked to enable push notifications (on both desktop and Android). They’re also signed up on the backend (in the push_notifications table).
Now all that is left is to get everyone else to check the forums again.
P.S: This prompt is still gated behind this setting: