node-notifier
node-notifier copied to clipboard
Notification are always dismissed, even with MacOS setting for Alerts
OS: MacOS 12.3.1 Node: v17.7.1
Is there a setting to make the notification persist? My notification always appear as "Banners" even though I've selected "Alerts" in the OS settings:
notifier.notify({
title: message,
message: JSON.stringify(data),
sound: true,
})
Similarly, but possibly unrelated: The notifications don't show up in my Mac's Notification Center, the way my WhatsApp, Slack, etc messages do.
Try adding a 'timeout' value. When Notification Centre is on 'Banners', the 'timeout' is ignore, but used when it's set to 'Alerts'
notifier.notify({
title: message,
message: JSON.stringify(data),
sound: true,
timeout: 30
})
Looks like that hack works. I'll just add
notifier.notify({
...
timeout: 99999999999,
})
when i want it to stay up until dismissed.