[nodebb-plugin-desktop-notifications] Desktop Notifications (like GMail)



  • @PitaJ I'd be more than happy to help. Without notifications that work on mobile a forum will have a very hard time to take off/be an alternative to facebook and whatsapp.



  • @PitaJ I have literally no clue what happened, but it works now.
    All I did was disable the addon, wait a few days, reenable it and restart nodebb 🤷



  • Ok after a few days of testing:

    • After allowing notifications the tab has to be closed and reopened for them to work.
    • I can't find a way to make them work on Chrome mobile or the PWA.
    • Chat messages play the sound on mobile... sometimes. I think the chat has to be opened for this first.
    • There are no desktop notifications for chat messages

    I'm pretty close to giving up and moving to another forum software... which would be a real shame since NodeBB offers everything else that I need and I wrote an LDAP plugin.


  • Global Moderator

    @meredrica notifications will only work if the page is open and connected to the internet. We don't have a serviceworker or anything like that for delivering push notifications.

    Chat messages don't create a notification for each message received (to avoid notification spam) , instead only creating a notification after a set delay after the last message received, if it isn't read in time. They should produce a sound every time, though. If this is not the case, please open a GitHub issue.


  • GNU/Linux Admin

    Potentially there's a use case for a service worker to check for notifications, perhaps that's something we can look into.

    On the sounds front, however, I'm a little on the fence about whether we should keep them. Not many apps use sounds, though I think there are more than a few people using NodeBB who would appreciate us keeping them around.

    That said, I think we'd need some new sound assets 😄



  • @julian I think it would be a good idea to implement the worker. Maybe add it to the notification plugin? Or maybe a web worker, I'm not sure if that wouldn't be better.

    Or maybe just a good old Javascript timer would do the trick.

    Service workers can become very complicated and if you have bugs in them they are very hard to get rid of. I would not use them if you don't want to have offline functionality.


  • Global Moderator

    @meredrica I don't think there's an instance where a timer or webworker would stay alive when a websockets connection wouldn't. Depending on how often we want to poll, opening a new connection periodically could be more expensive than just keeping the socket connection open.



  • @PitaJ any way I could contribute to the plugin? I can write the worker but I don't have the time to figure out the internals of nodebb right now.


  • Global Moderator

    @meredrica what are you planning on writing? A serviceworker?



  • @PitaJ Yea that's not a big deal to do really. I just need to know the API I should be polling client side. Maybe check if sock.js is connected and don't poll if it is.


Log in to reply
 

Suggested Topics

  • 2
  • 4
  • 4
  • 6
  • 3
| |