~sircmpwn/aerc

Ensure mimetype parts are converted to lower case v1 PROPOSED

Jeffas: 1
 Ensure mimetype parts are converted to lower case

 1 files changed, 3 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/aerc/patches/8012/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Ensure mimetype parts are converted to lower case Export this patch

This ensures that the check for a text message to use in the reply is
performed (more) correctly and so uses the plaintext more often.
---
 commands/msg/reply.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 34d03d5..813a66e 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -194,10 +194,11 @@ func findPlaintext(bs *models.BodyStructure,

	for i, part := range bs.Parts {
		cur := append(path, i+1)
		if part.MIMEType == "text" && part.MIMESubType == "plain" {
		if strings.ToLower(part.MIMEType) == "text" &&
			strings.ToLower(part.MIMESubType) == "plain" {
			return part, cur
		}
		if part.MIMEType == "multipart" {
		if strings.ToLower(part.MIMEType) == "multipart" {
			if part, path := findPlaintext(part, cur); path != nil {
				return part, path
			}
--
2.23.0
Thanks!

To git.sr.ht:~sircmpwn/aerc
   f6216bb..282dc44  master -> master