mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
Merge branch 'release/forth' into release/danube
This commit is contained in:
@ -35,7 +35,7 @@ func newWriter(root *Part) *Writer {
|
||||
|
||||
func (w *Writer) Write(ww io.Writer) error {
|
||||
if !w.root.is7BitClean() {
|
||||
w.root.Header.Add("Content-Transfer-Encoding", "base64")
|
||||
w.root.Header.Set("Content-Transfer-Encoding", "base64")
|
||||
}
|
||||
|
||||
msgWriter, err := message.CreateWriter(ww, w.root.Header)
|
||||
@ -68,7 +68,7 @@ func (w *Writer) write(writer *message.Writer, p *Part) error {
|
||||
|
||||
func (w *Writer) writeAsChild(writer *message.Writer, p *Part) error {
|
||||
if !p.is7BitClean() {
|
||||
p.Header.Add("Content-Transfer-Encoding", "base64")
|
||||
p.Header.Set("Content-Transfer-Encoding", "base64")
|
||||
}
|
||||
|
||||
childWriter, err := writer.CreatePart(p.Header)
|
||||
|
||||
@ -80,6 +80,7 @@ const (
|
||||
type Label struct {
|
||||
ID string
|
||||
Name string
|
||||
Path string
|
||||
Color string
|
||||
Order int `json:",omitempty"`
|
||||
Display int // Not used for now, leave it empty.
|
||||
|
||||
@ -29,6 +29,7 @@ import (
|
||||
"net/http"
|
||||
"net/mail"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@ -149,8 +150,9 @@ const ConversationIDDomain = `protonmail.conversationid`
|
||||
// InternalIDDomain is used as a placeholder for reference/message ID headers to improve compatibility with various clients.
|
||||
const InternalIDDomain = `protonmail.internalid`
|
||||
|
||||
// InternalReferenceFormat describes format of the message ID (as regex) used for parsing reference headers.
|
||||
const InternalReferenceFormat = `(?U)<.*@` + InternalIDDomain + `>`
|
||||
// RxInternalReferenceFormat is compiled regexp which describes the match for
|
||||
// a message ID used in reference headers.
|
||||
var RxInternalReferenceFormat = regexp.MustCompile(`(?U)<(.+)@` + regexp.QuoteMeta(InternalIDDomain) + `>`) //nolint[gochecknoglobals]
|
||||
|
||||
// Message structure.
|
||||
type Message struct {
|
||||
|
||||
Reference in New Issue
Block a user