From efe65ffc3c00a82fdf71f850360fd3b158ce599b Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Mon, 12 Dec 2016 21:45:53 +0200 Subject: [PATCH] Treat on,y Permanent bounces as hard bounces, skip everything else (eg autorseponders) --- routes/webhooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/webhooks.js b/routes/webhooks.js index 64083d4a..ffcf954d 100644 --- a/routes/webhooks.js +++ b/routes/webhooks.js @@ -48,7 +48,7 @@ router.post('/aws', (req, res, next) => { switch (req.body.Message.notificationType) { case 'Bounce': - campaigns.updateMessage(message, 'bounced', ['Undetermined', 'Permanent'].indexOf(req.body.Message.bounce.bounceType) >= 0, (err, updated) => { + campaigns.updateMessage(message, 'bounced', req.body.Message.bounce.bounceType === 'Permanent', (err, updated) => { if (err) { log.error('AWS', 'Failed updating message: %s', err.stack); } else if (updated) {