]> git.cworth.org Git - sup/blobdiff - lib/sup/poll.rb
bugfix: poll.rb assuming all messages have froms
[sup] / lib / sup / poll.rb
index d766587f58815f27ec07b485c07ca6ec5204542a..5027218c49d66318b309a062c1d222d81699d3a1 100644 (file)
@@ -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