sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d6aef055e73ff75603fa3f7ef0e4558e13442e5c
parent 733defd3698de5ac416866499b6e7f907604dea8
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Mon,  4 May 2009 05:37:04 -0700

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.

Diffstat:
M lib/sup/poll.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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