From d6aef055e73ff75603fa3f7ef0e4558e13442e5c Mon Sep 17 00:00:00 2001 From: William Morgan Date: Mon, 4 May 2009 05:37:04 -0700 Subject: [PATCH] bugfix: poll.rb assuming all messages have froms This was throwing an exception, so now it's protected. The from is only necessary for the after-poll hook. --- lib/sup/poll.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb index d766587..5027218 100644 --- a/lib/sup/poll.rb +++ b/lib/sup/poll.rb @@ -101,9 +101,9 @@ EOS yield "Found message at #{offset} with labels {#{m.labels * ', '}}" unless entry num += 1 - from_and_subj << [m.from.longname, m.subj] + from_and_subj << [m.from && m.from.longname, m.subj] if m.has_label?(:inbox) && ([:spam, :deleted, :killed] & m.labels).empty? - from_and_subj_inbox << [m.from.longname, m.subj] + from_and_subj_inbox << [m.from && m.from.longname, m.subj] numi += 1 end end -- 2.45.2