diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-03 15:06:29 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-03 15:06:29 +0100 |
commit | 1194b98e541cbe11af7c28e21590eb6d401fbaa0 (patch) | |
tree | bc653a27ff5c16ec59b109daebe728b5e4f44e50 | |
parent | 2d3cce64da6b7b3b2548b1676adbeb0c15851887 (diff) | |
download | alps-1194b98e541cbe11af7c28e21590eb6d401fbaa0.tar.gz alps-1194b98e541cbe11af7c28e21590eb6d401fbaa0.zip |
Fix EOF on message view
-rw-r--r-- | imap.go | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -253,12 +253,20 @@ func getMessagePart(conn *imapclient.Client, mboxName string, uid uint32, partPa var partHeaderSection imap.BodySectionName partHeaderSection.Peek = true - partHeaderSection.Specifier = imap.HeaderSpecifier + if len(partPath) > 0 { + partHeaderSection.Specifier = imap.MIMESpecifier + } else { + partHeaderSection.Specifier = imap.HeaderSpecifier + } partHeaderSection.Path = partPath var partBodySection imap.BodySectionName partBodySection.Peek = true - partBodySection.Specifier = imap.TextSpecifier + if len(partPath) > 0 { + partBodySection.Specifier = imap.EntireSpecifier + } else { + partBodySection.Specifier = imap.TextSpecifier + } partBodySection.Path = partPath fetch := []imap.FetchItem{ |