mikaelbr / node-notifier

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

Doesn't getting replied response when using timeout option (MAC) with low number #250

Open sarfarazansari opened 6 years ago

sarfarazansari commented 6 years ago

hey there

let opts: any = {
    title: data.title,
    message: data.message.content,
    icon: path.join(__dirname, '/assets/icon/icon.png'),
    sound: true,
    timeout: 5,
    reply: true
};

mac.notify(opts, (err: any, response: string, metadata: any) => {
      console.log (response);
      console.log (metadata);
      handleRes(e, data, err, response, metadata);
    });

when I tried to use timeout option with combination of reply, unable to listen on replied response. for reference check image image

Note: it's kind of a feature request if We can set timeout in lower number and if user replied then it should be listen by both events

mikaelbr commented 5 years ago

Hey! Have you tried using the wait option?

As (maybe poorly specified) here: https://github.com/mikaelbr/node-notifier#all-notification-options-with-their-defaults

wait is required for listening for reply