From ae7595e945e3fd3abd46aceba1e09c0a1f6249e4 Mon Sep 17 00:00:00 2001 From: Amir Yalon Date: Sat, 29 Feb 2020 22:33:31 +0200 Subject: [PATCH] Ignore missing message part in getDecodedPart The code that calls this function handles nil without issues. --- worker/imap/fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/imap/fetch.go b/worker/imap/fetch.go index f131117..bc7144c 100644 --- a/worker/imap/fetch.go +++ b/worker/imap/fetch.go @@ -173,7 +173,7 @@ func getDecodedPart(task *types.FetchMessageBodyPart, msg *imap.Message, r = msg.GetBody(section) if r == nil { - return nil, fmt.Errorf("getDecodedPart: no message body") + return nil, nil } r = encodingReader(task.Encoding, r) if task.Charset != "" {