Skip to content

Commit

Permalink
protonmail: mark more Message fields as json omitempty
Browse files Browse the repository at this point in the history
Setting an empty ExternalID results in an e-mail with:

    Message-Id: <>
  • Loading branch information
emersion committed Jul 30, 2021
1 parent 5475468 commit 4c7fd88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protonmail/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ type MessageAddress struct {
}

type Message struct {
ID string
ID string `json:",omitempty"`
Order int64
ConversationID string
ConversationID string `json:",omitempty"`
Subject string
Unread int
Type MessageType
Expand All @@ -77,10 +77,10 @@ type Message struct {
CCList []*MessageAddress
BCCList []*MessageAddress
ReplyTos []*MessageAddress
Header string
Header string `json:",omitempty"`
Attachments []*Attachment
LabelIDs []string
ExternalID string
ExternalID string `json:",omitempty"`
}

func (msg *Message) Read(keyring openpgp.KeyRing, prompt openpgp.PromptFunction) (*openpgp.MessageDetails, error) {
Expand Down

0 comments on commit 4c7fd88

Please sign in to comment.