refactor: tidy a bit

This commit is contained in:
James Houlahan
2020-08-05 15:00:31 +02:00
parent 0d4d95360f
commit f4374a02da
3 changed files with 17 additions and 14 deletions

View File

@ -277,7 +277,12 @@ func writeMIMEMessage(p *parser.Parser) (mime string, err error) {
NewWriter().
WithCondition(func(p *parser.Part) (keep bool) {
disp, _, err := p.Header.ContentDisposition()
return err != nil || disp != "attachment"
if err != nil {
return true
}
// TODO: Is it true that we don't want to write attachments? I thought this was for externals...
return disp != "attachment"
})
buf := new(bytes.Buffer)