SpringAll
SpringAll copied to clipboard
Web push notifications
Hi,
I'm creating this issue after reading this message.
So, uh, Firefox 44 just got on board with this push notifications from websites thing. It would be kinda cool to see push notifications added into the #diaspora codebase.
Is that possible ?
For more clarity on what the OP is talking about: https://blog.mozilla.org/blog/2016/01/25/firefox-can-now-get-push-notifications-from-your-favorite-sites/
Background fetching of notifications (and possibly allowing diaspora to show some notifications) is currently being implemented in #6493. I am pretty sure that's what you are talking about, @Bat41. If so, please confirm, this issue would be a dupe then.
However, if you actually are talking about push notifications (that is, receiving diaspora notifications without having a diaspora tab opened), well, everything is possible. However, every pod would have to set up their own API keys at some push service or even host their own. But oh well, that's still a valid feature request then.
Not the good button ...
And yes @denschub that's about receiving a push notification without a diaspora* tab opened.
I think the specification https://www.w3.org/TR/push-api/ should be linked and if I understand correctly, there is no registering every pod API keys to push services.
Possibly should be also linked (I use Firefox for Android, so Mozilla links) :
- https://developer.mozilla.org/en/docs/Web/API/Service_Worker_API
- https://developer.mozilla.org/en/docs/Web/API/Push_API
Sadly, Firefox and Chrome are the only browsers that have implemented the Web Push API, so it won't work in Safari and Internet Explorer/Edge. In addition, the Mozilla Push Service is the only one that would work without API keys. In Chrome, push messages have to get routed through GCM, thus requiring GCM API keys which we, as a project, cannot provide.
Oh hey this is an old issue! Safari now supports Web Push with macOS 13 and iOS 16 with the standardized APIs. Edge also supports Web Push, and since they're using Windows Notification Service, it also doesn't require any API auth.
This leaves Chrome to be the odd one out where to support Chrome, you need GCM API keys, but it works without any authentication in all other major browsers. If someone is interested in working on that, I'd be happy to mentor.