aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/msgviewer.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-07-21 11:47:30 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-23 21:51:47 +0200
commit5dec1f09b1d4a642aff1f711c44eb12e61b6129c (patch)
treeec0ceb3a3e5c4a50f24ba0e0973878cfa36e3e9c /widgets/msgviewer.go
parent52f7d3f900e4c0e3ee8458c9479859924901a3aa (diff)
downloadaerc-5dec1f09b1d4a642aff1f711c44eb12e61b6129c.tar.gz
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 8ed95b0d2ad2 ("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>
Diffstat (limited to 'widgets/msgviewer.go')
0 files changed, 0 insertions, 0 deletions