WIP: Fix "Subscription failed - no active Service Worker"
Fix Subscription failed - no active Service Worker
by waiting for the Service Worker registration to be active before trying to subscribe registration.pushManager.subscribe()
Enable push notifications locally
General docs on web push, https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol
node ./scripts/utils/feature-toggle.js --name web-push --description "Enable web-push notifications" --enable-off
- Visit http://localhost:5000/api_web/features/web-push/1 to enable
web-push
feature - ... todo ...
Other references,
- https://developers.google.com/web/fundamentals/codelabs/push-notifications/
- https://developers.google.com/web/fundamentals/codelabs/debugging-service-workers/#testing_push_notifications
- https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications
- https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification
- https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/getNotifications
Closes https://gitlab.com/gitlab-org/gitter/webapp/issues/1892
Edited by 🤖 GitLab Bot 🤖