From eecda9c0245b4c9af476624451dce24c38d6b96f Mon Sep 17 00:00:00 2001 From: Konstantinos Koukas Date: Thu, 3 Aug 2023 18:28:27 +0300 Subject: themes/alps: handle messages without text parts Fixes: https://todo.sr.ht/~migadu/alps/165 --- themes/alps/message.html | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'themes') diff --git a/themes/alps/message.html b/themes/alps/message.html index ee5aa02..8f67e8d 100644 --- a/themes/alps/message.html +++ b/themes/alps/message.html @@ -185,20 +185,17 @@ {{ $text := .Message.TextPart }}
{{/* https://github.com/golang/go/issues/31103 */}} + {{ if $text }} + {{ if ne $text.MIMEType "text/html" }} - {{ if eq $text.MIMEType "text/html" }} - HTML - {{ else }} - Plain text + >Plain text {{ end }} - - {{ if and $html $text }} - {{ if ne $html.PathString $text.PathString }} + {{ end }} + {{ if $html }} HTML {{ end }} - {{ end }} Raw email
-- cgit v1.2.3-59-g8ed1b