webmail: in message view, under More, add button to open currently displayed part (either text or html) as raw text (but decoded if in base64/quoted-printable/etc).

This commit is contained in:
Mechiel Lukkien
2025-01-22 21:18:02 +01:00
parent 7647264a72
commit 008de1cafb
8 changed files with 66 additions and 8 deletions

View File

@ -186,8 +186,7 @@ type ParsedMessage struct {
Headers map[string][]string
ViewMode store.ViewMode
// Text parts, can be empty.
Texts []string
Texts []string // Contents of text parts, can be empty.
// Whether there is an HTML part. The webclient renders HTML message parts through
// an iframe and a separate request with strict CSP headers to prevent script
@ -198,6 +197,9 @@ type ParsedMessage struct {
ListReplyAddress *MessageAddress // From List-Post.
TextPaths [][]int // Paths to text parts.
HTMLPath []int // Path to HTML part.
// Information used by MessageItem, not exported in this type.
envelope MessageEnvelope
attachments []Attachment