-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The callback in this example from the README always sends out the alert that notifications are disabled:
Cocoon.Notification.Local.initialize({}, function(registered) {
if (!registered) {
alert('Notifications disabled by user')
}
else {
sendNotification();
}
})This is because there's a bug in line 130 of cocoon_notifications.js that ensures that registered is always false: https://github.com/ludei/atomic-plugins-notifications/blob/master/src/js/cocoon_notifications.js#L130
Until that bug is fixed, this is a workaround that should work:
Cocoon.Notification.Local.initialize({}, function (registered) {
Cocoon.Notification.Local.isRegistered(function (granted) {
if (!granted) {
alert('Notifications disabled by user');
} else {
sendNotification();
}
});
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels