~sircmpwn/aerc

3c3bc517b5d0a860c03c9c5a701f733bd4bf4e4d — Jeffas 1 year, 4 months ago f6216bb
Ensure mimetype parts are converted to lower case

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.
1 files changed, 3 insertions(+), 2 deletions(-)

M commands/msg/reply.go
M commands/msg/reply.go => commands/msg/reply.go +3 -2
@@ 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
			}