Skip to content

Commit 5243bef

Browse files
authored
Additional Headers field to the File structure (#1380)
add Headers field to support headers of an email file attachment. Example: ``` "headers": { "date": "Thu, 23 Jan 2025 18:09:25 +0100", "in_reply_to": null, "reply_to": null, "message_id": "<email_provider_message_id>" }, ``` related to #1370
2 parents a454f77 + 8e980f4 commit 5243bef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

files.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ type File struct {
9494
To []EmailFileUserInfo `json:"to"`
9595
From []EmailFileUserInfo `json:"from"`
9696
Cc []EmailFileUserInfo `json:"cc"`
97+
Headers EmailHeaders `json:"headers"`
9798
}
9899

99100
type EmailFileUserInfo struct {
@@ -102,6 +103,13 @@ type EmailFileUserInfo struct {
102103
Original string `json:"original"`
103104
}
104105

106+
type EmailHeaders struct {
107+
Date string `json:"date"`
108+
InReplyTo string `json:"in_reply_to"`
109+
ReplyTo string `json:"reply_to"`
110+
MessageID string `json:"message_id"`
111+
}
112+
105113
type Share struct {
106114
Public map[string][]ShareFileInfo `json:"public"`
107115
Private map[string][]ShareFileInfo `json:"private"`

0 commit comments

Comments
 (0)