mirror of
1
Fork 0

Add inline attachments to comments

If incoming email is configured and an email is sent, inline
attachments are currently not added to the comment if it has the
`Content-Disposition: inline` instead of
`Content-Disposition: attachment` as e.g. with Apple Mail.

This adds inline attachments (`Content-Disposition: inline`) that have a
filename as attachment to the comment.

Fixes #3496
This commit is contained in:
Beowulf 2024-04-28 00:33:03 +02:00
parent bfdbc2371d
commit 162b840100
No known key found for this signature in database
GPG Key ID: 44225F5F2792841D
1 changed files with 8 additions and 0 deletions

View File

@ -367,6 +367,14 @@ func getContentFromMailReader(env *enmime.Envelope) *MailContent {
Content: attachment.Content, Content: attachment.Content,
}) })
} }
for _, inline := range env.Inlines {
if inline.FileName != "" {
attachments = append(attachments, &Attachment{
Name: inline.FileName,
Content: inline.Content,
})
}
}
return &MailContent{ return &MailContent{
Content: reply.FromText(env.Text), Content: reply.FromText(env.Text),