mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
Tests and final touches
This commit is contained in:
@ -24,7 +24,7 @@ import (
|
||||
"io/ioutil"
|
||||
"sync"
|
||||
|
||||
pkgMessage "github.com/ProtonMail/proton-bridge/pkg/message"
|
||||
pkgMsg "github.com/ProtonMail/proton-bridge/pkg/message"
|
||||
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@ -246,7 +246,7 @@ func (p *PMAPIProvider) generateImportMsgReq(rules transferRules, progress *Prog
|
||||
func (p *PMAPIProvider) parseMessage(msg Message) (m *pmapi.Message, r []io.Reader, err error) {
|
||||
p.timeIt.start("parse", msg.ID)
|
||||
defer p.timeIt.stop("parse", msg.ID)
|
||||
message, _, _, attachmentReaders, err := pkgMessage.Parse(bytes.NewBuffer(msg.Body))
|
||||
message, _, _, attachmentReaders, err := pkgMsg.Parse(bytes.NewBuffer(msg.Body))
|
||||
return message, attachmentReaders, err
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ func (p *PMAPIProvider) encryptMessage(msg *pmapi.Message, attachmentReaders []i
|
||||
if msg.MIMEType == pmapi.ContentTypeMultipartEncrypted {
|
||||
return []byte(msg.Body), nil
|
||||
}
|
||||
return pkgMessage.BuildEncrypted(msg, attachmentReaders, p.keyRing)
|
||||
return pkgMsg.BuildEncrypted(msg, attachmentReaders, p.keyRing)
|
||||
}
|
||||
|
||||
func computeMessageFlags(labels []string) (flag int64) {
|
||||
|
||||
Reference in New Issue
Block a user