mikaelbr / node-notifier

A Node.js module for sending notifications on native Mac, Windows and Linux (or Growl as fallback)
MIT License
5.72k stars 323 forks source link

Add Support for SnoreToast 'Application' Argument #430

Open chevonc opened 1 year ago

chevonc commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

I found the need to be able to pass the application parameter, so notifications in action center will launch my app when clicked.

Here is the diff that solved my problem:

diff --git a/node_modules/node-notifier/lib/utils.js b/node_modules/node-notifier/lib/utils.js
index fe4b164..f31035f 100644
--- a/node_modules/node-notifier/lib/utils.js
+++ b/node_modules/node-notifier/lib/utils.js
@@ -363,7 +363,8 @@ const allowedToasterFlags = [
   'pid',
   'pipeName',
   'close',
-  'install'
+  'install',
+  'application'
 ];
 const toasterSoundPrefix = 'Notification.';
 const toasterDefaultSound = 'Notification.Default';

This issue body was partially generated by patch-package.