From 1359c39bc0e693c4badc020bb23b7bd65f0c2ab4 Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Wed, 14 Apr 2021 09:58:39 +0200 Subject: [PATCH] GODT-213: Remove dead code GetRelatedHeader/GetRelatedBoundary --- pkg/message/header.go | 6 ------ pkg/message/message.go | 6 ------ 2 files changed, 12 deletions(-) diff --git a/pkg/message/header.go b/pkg/message/header.go index fe08f1d2..81569a9f 100644 --- a/pkg/message/header.go +++ b/pkg/message/header.go @@ -101,12 +101,6 @@ func GetBodyHeader(m *pmapi.Message) textproto.MIMEHeader { return h } -func GetRelatedHeader(m *pmapi.Message) textproto.MIMEHeader { - h := make(textproto.MIMEHeader) - h.Set("Content-Type", "multipart/related; boundary="+GetRelatedBoundary(m)) - return h -} - func GetAttachmentHeader(att *pmapi.Attachment, buildForIMAP bool) textproto.MIMEHeader { mediaType := att.MIMEType if mediaType == "application/pgp-encrypted" { diff --git a/pkg/message/message.go b/pkg/message/message.go index 90ab4930..1652f67b 100644 --- a/pkg/message/message.go +++ b/pkg/message/message.go @@ -38,12 +38,6 @@ func GetBoundary(m *pmapi.Message) string { return fmt.Sprintf("%x", sha512.Sum512_256([]byte(m.ID))) } -func GetRelatedBoundary(m *pmapi.Message) string { - // The boundary needs to be deterministic because messages are not supposed to - // change. - return fmt.Sprintf("%x", sha512.Sum512_256([]byte(m.ID+m.ID))) -} - func SeparateInlineAttachments(m *pmapi.Message) (atts, inlines []*pmapi.Attachment) { for _, att := range m.Attachments { if strings.Contains(att.Header.Get("Content-Disposition"), pmapi.DispositionInline) {