1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

message: Include inlines when returning attachments (#398)

Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
James Hillyerd
2023-09-14 14:29:33 -07:00
committed by GitHub
parent 63e47a4e74
commit 3709aa8b51
4 changed files with 61 additions and 5 deletions

View File

@@ -28,7 +28,9 @@ func New(m event.MessageMetadata, e *enmime.Envelope) *Message {
// Attachments returns the MIME attachments for the message.
func (m *Message) Attachments() []*enmime.Part {
return m.env.Attachments
attachments := append([]*enmime.Part{}, m.env.Inlines...)
attachments = append(attachments, m.env.Attachments...)
return attachments
}
// Header returns the header map for this message.