aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/message.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-09-21 00:27:58 +0200
committerRobin Jarry <robin@jarry.cc>2022-09-25 11:54:23 +0200
commite5b0725824ac9ccf218732238e4b3b525fa6ad46 (patch)
tree54ae2d8ea02616c32a74a3d4fcfb3dce50d1c376 /worker/notmuch/message.go
parent41822a6123d5b6779be436d738bf26747de87b0a (diff)
downloadaerc-e5b0725824ac9ccf218732238e4b3b525fa6ad46.tar.gz
charset: handle unknown charsets more user-friendly
Do not throw an error when the charset is unknown; the message entity can still be read, but log the error instead. Reported-by: falsifian Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch/message.go')
-rw-r--r--worker/notmuch/message.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/worker/notmuch/message.go b/worker/notmuch/message.go
index a51f78b3..59367fd1 100644
--- a/worker/notmuch/message.go
+++ b/worker/notmuch/message.go
@@ -11,8 +11,6 @@ import (
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/worker/lib"
notmuch "git.sr.ht/~rjarry/aerc/worker/notmuch/lib"
- "github.com/emersion/go-message"
- _ "github.com/emersion/go-message/charset"
)
type Message struct {
@@ -47,7 +45,7 @@ func (m *Message) NewBodyPartReader(requestedParts []int) (io.Reader, error) {
return nil, err
}
defer f.Close()
- msg, err := message.Read(f)
+ msg, err := lib.ReadMessage(f)
if err != nil {
return nil, fmt.Errorf("could not read message: %w", err)
}