From 485b07f797ade7ac30e00889d73a392997212faf Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 23 Jun 2016 15:30:30 -0500 Subject: [PATCH] to and from are arrays --- imap-probe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap-probe.js b/imap-probe.js index ffe101f..c500fa5 100644 --- a/imap-probe.js +++ b/imap-probe.js @@ -133,8 +133,8 @@ function searchMessage(message, needle) { if (needle.subject && message.subject[0].match(needle.subject) === null) return false; if (needle.body && message.body.match(needle.body) === null) return false; - if (needle.to && message.to.match(needle.to) === null) return false; - if (needle.from && message.from.match(needle.from) === null) return false; + if (needle.to && message.to[0].match(needle.to) === null) return false; + if (needle.from && message.from[0].match(needle.from) === null) return false; return true; }