Our relationship with push notifications has been rather circuitous...
- 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.
- Then I wrote the PushBullet plugin, but they went from free to paid and that went out the window
- Around that time I wrote the Firebase plugin, which was a dead end because there was no iOS support.
- I then wrote the ntfy plugin, which works really well, but does rely on a freemium third-party service and app (written by @binwiederhier@discuss.ntfy.sh)
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.

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.
The web-push plugin has now been promoted in v4 beta to "bundled" status, with a corresponding demotion of the ntfy plugin.
https://github.com/NodeBB/NodeBB/commit/aa060d31d130cd54d18cd8dc2f25ba7de58f4fea
The plugin also successfully removes notifications if they're no longer relevant (e.g. queued posts that have already been handled), and merges notification content just like it does in-app:
v0.7.0 of the Push Notification plugin has been released
develop
branchjulian when does 3.10 come out? 😁
phenomlab Right now :laughing:
julian Hmm - still not working for me... :-(
EDIT - works on my Android phone, but not on my PC - guessing it's likely security software. EDIT 2 - suspicion confirmed. It's caused by NordVPN. If running, the push notification doesn't work - if disabled, it works fine.
phenomlab said in Native Push Notifications Support for NodeBB: > NordVPN
Thanks for closing the loop! Kind of annoying that NordVPN blocks them...
julian Is there a link where we can install the v4 beta version of this plugin? I'd love to test it out over on Sudonix.
EDIT - NVM - I found the link..
phenomlab glad to hear you found it :smile:
For those interested in updating, you can just grab the latest commit from
activitypub
branch or perhaps the more the specific commit:julian I'm using the GIT link you provided to install. Plugin installs fine, but cannot get it to send any notification - even on my mobile device which works fine for NodeBB?
phenomlab There's not terribly much to configure, just make sure that when you start NodeBB, that you see the output
info: [plugins/web-push] VAPID keys OK.
That's how the messages are encoded to be sent to the corresponding browser push endpoints.
Other than that make sure the user has toggled push notifications on in their settings and allowed notifications for the site.
On Windows, you have to specifically also allow your browser access to send notifications to the user.
julian Yes, I've done that, but can't seem to make it work.