From 5baed314d396398ce3651f3d999d4af8897ebf37 Mon Sep 17 00:00:00 2001 From: Alexey Shmalko Date: Tue, 12 Dec 2017 20:19:25 +0200 Subject: [PATCH] Fix post command execution Currently, `onNotify` command is executed twice in a row and `onNotifyPost` is not executed at all. The issue is caused by a type in the code. Known workaround: use an object for post command instead of a string. --- bin/imapnotify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/imapnotify b/bin/imapnotify index 5ee657c..9097381 100755 --- a/bin/imapnotify +++ b/bin/imapnotify @@ -240,7 +240,7 @@ function executeOnNotify(config) { return function notify(box, event) { var formattedBox = replace(box.toLowerCase(), '/', '-') , formattedCommand = printf(commandIsEventMap ? command[event] || '': command, formattedBox) - , formattedPostCommand = printf(postCommandIsEventMap ? postCommand[event] || '': command, formattedBox) + , formattedPostCommand = printf(postCommandIsEventMap ? postCommand[event] || '': postCommand, formattedBox) return executeCommands(formattedCommand, formattedPostCommand) } }