Other refactor: clean old builder

This commit is contained in:
Jakub Cuth
2021-04-27 08:12:50 +00:00
parent 286f51a4e7
commit 94b5799ba7
14 changed files with 790 additions and 935 deletions

View File

@ -20,10 +20,8 @@ package fakeapi
import (
"errors"
"fmt"
"net/mail"
"strings"
messageUtils "github.com/ProtonMail/proton-bridge/pkg/message"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
)
@ -141,7 +139,6 @@ func (ctl *Controller) AddUserMessage(username string, message *pmapi.Message) (
}
message.ID = ctl.messageIDGenerator.next("")
message.LabelIDs = append(message.LabelIDs, pmapi.AllMailLabel)
message.Header = mail.Header(messageUtils.GetHeader(message))
for iAtt := 0; iAtt < message.NumAttachments; iAtt++ {
message.Attachments = append(message.Attachments, newTestAttachment(iAtt, message.ID))