shithub: Nail

Download patch

ref: f244847ee0654296c7bdce8c290f8faea6e101e8
parent: 79f01cc808934ec40a8e5817cc088593abc65659
author: kvik <kvik@a-b.xyz>
date: Fri Dec 4 13:27:21 EST 2020

mesg: first text/plain or text/html part wins

--- a/mesg.c
+++ b/mesg.c
@@ -175,9 +175,7 @@
 			continue;
 		} 
 		m->parts[m->nparts++] = a;
-		if(a->filename != nil || a->disposition != nil && strcmp(a->disposition, "inline") != 0)
-			continue;
-		if(strcmp(a->type, "text/plain") == 0)
+		if(m->body == nil && strcmp(a->type, "text/plain") == 0)
 			m->body = a;
 		else if(m->body == nil && strcmp(a->type, "text/html") == 0)
 			m->body = a;