Our relationship with push notifications has been rather circuitous…

  1. First Andrew (@psychobunny) tried plain desktop notifications via the Notification API (that’s the desktop notifications plugin), but notification delivery stopped when you closed your browser.
  2. Then I wrote the PushBullet plugin, but they went from free to paid and that went out the window
  3. Around that time I wrote the Firebase plugin, which was a dead end because there was no iOS support.
  4. I then wrote the ntfy plugin, which works really well, but does rely on a freemium third-party service and app (written by @[email protected])

Thanks to some recent discussion from @crazycells and @bh4-tech, I learned that the Push API had reached general availability across most modern browsers. In fact, this actually happened over a year ago, so compatibility should be even better.

So I set about working on yet another push notifications plugin, hopefully for the last time, and this time using the native Push API on the client-side.

To enable them, simply navigate over to the “Push Notifications” menu item in your user profile, and flip the switch.

6da06989-f902-492b-866f-14c39b34a9ca-image.png

So, let’s dogfood! I de-activated the ntfy plugin on this site and activated the web-push plugin so you can try it out right now.

The plugin is in the proof-of-concept phase, so there might (read: most definitely will be) issues. Please let me know any you find here.

  • julian@community.nodebb.orgOP
    link
    fedilink
    arrow-up
    1
    ·
    17 days ago

    @Pankaj-Soni yes and no… the enabling of the push notifications requires a discrete user action — the user has to actually press the switch to enable notifications.

    There are ways we can advertise this to end users, so I will look into adding those soon. For now, users will have to go into their user settings to enable push notifications.