protonmail: mark more Message fields as json omitempty

Setting an empty ExternalID results in an e-mail with:

    Message-Id: <>
This commit is contained in:
Simon Ser 2021-07-30 15:32:37 +02:00
parent 5475468321
commit 4c7fd88d57
1 changed files with 4 additions and 4 deletions

View File

@ -54,9 +54,9 @@ type MessageAddress struct {
} }
type Message struct { type Message struct {
ID string ID string `json:",omitempty"`
Order int64 Order int64
ConversationID string ConversationID string `json:",omitempty"`
Subject string Subject string
Unread int Unread int
Type MessageType Type MessageType
@ -77,10 +77,10 @@ type Message struct {
CCList []*MessageAddress CCList []*MessageAddress
BCCList []*MessageAddress BCCList []*MessageAddress
ReplyTos []*MessageAddress ReplyTos []*MessageAddress
Header string Header string `json:",omitempty"`
Attachments []*Attachment Attachments []*Attachment
LabelIDs []string LabelIDs []string
ExternalID string ExternalID string `json:",omitempty"`
} }
func (msg *Message) Read(keyring openpgp.KeyRing, prompt openpgp.PromptFunction) (*openpgp.MessageDetails, error) { func (msg *Message) Read(keyring openpgp.KeyRing, prompt openpgp.PromptFunction) (*openpgp.MessageDetails, error) {