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

metadata is not NotificationMetadata format in Windows10 #398

Open blackbutton opened 2 years ago

blackbutton commented 2 years ago

I use node-notifier in windows10, but NotificationCallback output metadata puzzle me。This is my code: const notify = ({title, message}, cb) => { notifier.notify( { title: title || "Unknown title", message: message || "Unknown message", sound: true, actions: ['OK', 'Cancel'], reply: true, }, (err, response, metadata) => { console.log(metadata); cb(metadata); }); }; =====================output { "action": "buttonClicked", "notificationId": "14096", "pipe": "\\.\pipe\notifierPipe-fa8bbb26-b562-4ad7-83b6-428f77bbaaa8", "button": "OK", "version": "0.7.0", "activationType": "OK" } why not NotificationMetadata format interface NotificationMetadata { activationType?: string | undefined; activationAt?: string | undefined; deliveredAt?: string | undefined; activationValue?: string | undefined; activationValueIndex?: string | undefined; }