Skip to content

Commit

Permalink
Fix: Correctly decode X-Tags message headers (RFC 2047) (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed Aug 9, 2024
1 parent a21808d commit a060abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/storage/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func Store(body *[]byte) (string, error) {
ReplyTo: addressToSlice(env, "Reply-To"),
}

messageID := strings.Trim(env.Root.Header.Get("Message-ID"), "<>")
messageID := strings.Trim(env.GetHeader("Message-ID"), "<>")
created := time.Now()

// use message date instead of created date
Expand Down Expand Up @@ -116,7 +116,7 @@ func Store(body *[]byte) (string, error) {
tags := findTagsInRawMessage(body)

if !config.TagsDisableXTags {
xTagsHdr := env.Root.Header.Get("X-Tags")
xTagsHdr := env.GetHeader("X-Tags")
if xTagsHdr != "" {
// extract tags from X-Tags header
tags = append(tags, tools.SetTagCasing(strings.Split(strings.TrimSpace(xTagsHdr), ","))...)
Expand Down

0 comments on commit a060abd

Please sign in to comment.