mikaelbr / node-notifier

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

fix: `options.customPath` doesn't work for windows toaster #373

Closed Araxeus closed 3 years ago

Araxeus commented 3 years ago

This is a really simple solution for a weird problem that somehow got through testing:

There is supposedly an option options.customPath. except it would never work if specified in notify() options because just before we check for this options. - we call options = utils.mapToWin8(options); which always result in options.customPath = undefined, since its not an allowedToasterFlag (it gets deleted from the options)

TL:DR - utils.mapToWin8(options) delete options.customPath before it can be used

The easy solution is to just save options.customPath before mapToWin8() is called, and use the saved value

Araxeus commented 3 years ago

Had a little woupsie when I "fixed" balloon and notificationcenter which was unnecessary and resulted in superfluous commits, so this PR should probably be squash merged