sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 7087ee34dc6e6c12198e500a61150350f9e17d70
parent 5b9eddb8a949c1a712d53ec8fe163de2848d5ac9
Author: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Date:   Fri,  4 Apr 2008 18:01:45 +0200

handle nil header values in crypto recipient key selection

Diffstat:
M lib/sup/modes/edit-message-mode.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
@@ -321,7 +321,7 @@ protected
     ## do whatever crypto transformation is necessary
     if @crypto_selector && @crypto_selector.val != :none
       from_email = PersonManager.person_for(@header["From"]).email
-      to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email }
+      to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email }
 
       m = CryptoManager.send @crypto_selector.val, from_email, to_email, m
     end