일부 경우 푸시 알림을 활성화해도 실제 구독이 되지 않습니다

초기 온보딩 과정에서 iOS 사용자는 포럼을 PWA로 설치한 후, PWA를 처음 열 때 알림 동의 배너를 받는 것을 관찰했습니다.
이 동의 배너에서 "알림 활성화"를 클릭하면 권한이 요청되고, 이후 확인 알림이 전송됩니다.

그러나, 이는 실제로 사용자를 푸시 알림에 구독하지 않습니다. 이는 예상치 못한 동작입니다!

알림 동의 배너의 경우, 여기의 코드는 먼저 사용자 동의를 요청하기(Notification.requestPermission) 위해 else 경로를 따르지만, 푸시 알림에 구독하지는 않습니다(subscribePushNotification).


현재의 우회 방법은 사용자가 알림 설정으로 이동하여那里的 “알림 활성화” 버튼을 클릭하는 것입니다.

1개의 좋아요

https://github.com/discourse/discourse/pull/34644

Thanks so much for the detailed pull request here, will have someone from the team have a look over the next few weeks!

1개의 좋아요

Thank you!

I’ve done some more work on that PR since posting it - hopefully it won’t be too much :slight_smile:
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.

1개의 좋아요

I’ve deployed that change to my forums and it is now live.
I think this’ll really increase participation from my users :smiley:

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:

2개의 좋아요

Appreciate all the work here, we are just getting back from our meetup now, we should be able to give it a proper review in the next couple of weeks.

1개의 좋아요