-
-
Notifications
You must be signed in to change notification settings - Fork 178
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebPush Delivery Method #112
Comments
@excid3 push endpoints expire after a while. Webpush gem method has a method to check for expired endpoints. I use that to clean up the database Not sure if it can be part of this gem but might be worth considering |
something like this rescue Webpush::Unauthorized which can rescue publish method |
Good to know about the expirations. 👍 I haven't tried this out before, so lots to learn. |
@excid3 service worker has an event called 'pushsubscriptionchange' when the push endpoint expires, the event gets triggered which can be used to create another push endpoint in the background. something like this
I am curious how you will choose to handle that. I could not see a way to update an existing subscription record so using those rescue methods to clean up the database and create a new subscription. There is not an identifier to use I think there is also this idea to include service worker as part of asset pipeline or webpacker |
Not sure if this is still being considered for Noticed but big news today for WebPush. I've never bothered looking into WebPush until iOS/iPadOS devices supported it but it seems like WebPush will be becoming much more popular now |
I created a video walking through setting this up with full support for iOS clients even. Was wondering if there would be interest in getting this pulled in as a PR. My big question would be around what the javascript resources would look like since so much of that is going to be custom. Video Link: https://youtu.be/WHZ4strj6_U |
I added a PR to automated most of the WebPush setup: #297 |
Thanks @jbennett can't wait to check this out! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Web Push requires a service worker and a model to work.
https://blog.mozilla.org/services/2016/08/23/sending-vapid-identified-webpush-notifications-via-mozillas-push-service/
The Webpush gem provides some helpful features for generating VAPID keys, etc.
Some sample code:
The text was updated successfully, but these errors were encountered: