mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
GODT-213: Remove dead code GetRelatedHeader/GetRelatedBoundary
This commit is contained in:
@ -101,12 +101,6 @@ func GetBodyHeader(m *pmapi.Message) textproto.MIMEHeader {
|
|||||||
return h
|
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 {
|
func GetAttachmentHeader(att *pmapi.Attachment, buildForIMAP bool) textproto.MIMEHeader {
|
||||||
mediaType := att.MIMEType
|
mediaType := att.MIMEType
|
||||||
if mediaType == "application/pgp-encrypted" {
|
if mediaType == "application/pgp-encrypted" {
|
||||||
|
|||||||
@ -38,12 +38,6 @@ func GetBoundary(m *pmapi.Message) string {
|
|||||||
return fmt.Sprintf("%x", sha512.Sum512_256([]byte(m.ID)))
|
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) {
|
func SeparateInlineAttachments(m *pmapi.Message) (atts, inlines []*pmapi.Attachment) {
|
||||||
for _, att := range m.Attachments {
|
for _, att := range m.Attachments {
|
||||||
if strings.Contains(att.Header.Get("Content-Disposition"), pmapi.DispositionInline) {
|
if strings.Contains(att.Header.Get("Content-Disposition"), pmapi.DispositionInline) {
|
||||||
|
|||||||
Reference in New Issue
Block a user