openconf / jschat

frontend community chat
MIT License
23 stars 6 forks source link

migrate to latest Notifications API #89

Open sejoker opened 10 years ago

sejoker commented 10 years ago

According to the official docs: https://developer.mozilla.org/en-US/docs/Web/API/notification latest versions of Chrome, Firefox, Safari support Notifications API. Current implementation in client/services/Notification.js supports only Chrome.

sejoker commented 10 years ago

I am planning to make PR with proposed changes

sudodoki commented 10 years ago

I assume (and need @edjafarov to confirm) we care about notifications only in desktop client, which are done using node-webkit, thus the prefixed version.

edjafarov commented 10 years ago

@sudodoki almost. Ideally we would have notifications everywhere possible. It is reasonable to have desktop notifications for browsers as well. It is implemented for chrome because desktop is top priority for next milestone. @sejoker, PR is welcome! While implementing we also need to think about duplicate messages. Ideally several tabs+app shouldn't make duplicate messages if possible. (I am not sure if it's possible for desktop) Though at least multiple tabs should know that they shouldn't fire multiple notifications.(my guess is localStorage or smth like that)