psychobunny / nodebb-plugin-desktop-notifications

This NodeBB plugin uses the HTML5 Notifications API to display desktop alerts upon new incoming notifications.
BSD 2-Clause "Simplified" License
19 stars 16 forks source link

Notification shouldn't appear when NodeBB is current/opened/focused/active tab #31

Open marczellm opened 6 years ago

marczellm commented 6 years ago

I was reading a NodeBB topic. The in-browser NodeBB toast appeared and a split second afterwards, it was covered by the desktop notification. This shouldn't happen. When I am browsing NodeBB no desktop notifications should be sent, because I will be seeing the original NodeBB ones on the site. (I don't know enough of Web APIs on how to do that, but Gmail and others already implement this distinction.)