node-notifier icon indicating copy to clipboard operation
node-notifier copied to clipboard

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

Open sarfarazansari opened this issue 6 years ago • 1 comments

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

sarfarazansari avatar Aug 07 '18 11:08 sarfarazansari

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

mikaelbr avatar Jan 24 '19 12:01 mikaelbr