aerc/worker
Robin Jarry 5dec1f09b1 imap: fix error when server returns a message without body section
When opening unread emails from certain people (I won't name any names,
sorry), an annoying error message is displayed on the status line:

 could not get section &imap.BodySectionName{BodyPartName:
 imap.BodyPartName{Specifier:"", Path:[]int(nil), Fields:[]string(nil),
 NotFields:false}, Peek:false, Partial:[]int(nil), value}

This does not occur for already read messages. This issue is similar to
the one that was fixed in commit 8ed95b0d2a ("imap: avoid crash when
replying to unread message").

This happens because the flags are updated in the callback that receives
the message itself. It causes the flag update to arrive in the same
channel/request. Ignore the messages that have an empty body (i.e. only
containing flag updates). This is inherently racy but there seems no way
to get rid of these extra messages.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Koni Marti <koni.marti@gmail.com>
2022-07-23 21:51:47 +02:00
..
handlers go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap imap: fix error when server returns a message without body section 2022-07-23 21:51:47 +02:00
lib mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00
maildir account: import mbox file to a folder 2022-07-14 23:14:56 +02:00
mbox mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00
notmuch threading: enable filtering of server-side threads 2022-07-10 21:15:12 +02:00
types threading: enable filtering of server-side threads 2022-07-10 21:15:12 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
worker_enabled.go mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00