sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 504100df8424584ee1217716a6dd9def30aebb91
parent 8264eb55f786fe918537dc1baa5dc6e38df5d61f
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Sun, 29 Dec 2013 15:51:23 +0100

cleanup: previous patch

Diffstat:
M lib/sup/message.rb | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -497,17 +497,21 @@ private
       ## they have no MIME multipart and just set the body content type to
       ## application/pgp. this handles that.
       ##
-      ## TODO: unduplicate code between here and multipart_encrypted_to_chunks
-      ## lf TODO: this only tries to decrypt. it cannot handle inline PGP
+      ## TODO 1: unduplicate code between here and
+      ##         multipart_encrypted_to_chunks
+      ## TODO 2: this only tries to decrypt. it cannot handle inline PGP
       notice, sig, decryptedm = CryptoManager.decrypt m.body
       if decryptedm # managed to decrypt
         children = message_to_chunks decryptedm, true
         [notice, sig].compact + children
       else
-## try inline pgp signed 
+        ## try inline pgp signed
       	chunks = inline_gpg_to_chunks m.body, $encoding, (m.charset || $encoding)
-	return chunks if chunks
-        [notice]
+        if chunks
+          chunks
+        else
+          [notice]
+        end
       end
     else
       filename =
@@ -583,7 +587,7 @@ private
     # -----END PGP SIGNED MESSAGE-----
     #
     # In some cases, END PGP SIGNED MESSAGE doesn't appear
-    # lf: leaves strange -----BEGIN PGP SIGNATURE----- in that case?	
+    # (and may leave strange -----BEGIN PGP SIGNATURE----- ?)
     gpg = lines.between(GPG_SIGNED_START, GPG_SIGNED_END)
     # between does not check if GPG_END actually exists
     # Reference: http://permalink.gmane.org/gmane.mail.sup.devel/641