mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Custom types for flags and encrypted outside test
This commit is contained in:
@ -45,7 +45,7 @@ type SendPreferences struct {
|
||||
// internal emails (including the so-called encrypted-to-outside emails,
|
||||
// which even though meant for external users, they don't really get out of
|
||||
// our platform). If the email is sent unencrypted, no PGP scheme is needed.
|
||||
Scheme int
|
||||
Scheme pmapi.PackageFlag
|
||||
|
||||
// MIMEType is the MIME type to use for formatting the body of the email
|
||||
// (before encryption/after decryption). The standard possibilities are the
|
||||
|
||||
@ -41,7 +41,7 @@ func TestPreferencesBuilder(t *testing.T) {
|
||||
|
||||
wantEncrypt bool
|
||||
wantSign bool
|
||||
wantScheme int
|
||||
wantScheme pmapi.PackageFlag
|
||||
wantMIMEType string
|
||||
wantPublicKey string
|
||||
}{
|
||||
|
||||
@ -283,7 +283,7 @@ func (su *smtpUser) Send(from string, to []string, messageReader io.Reader) (err
|
||||
return err
|
||||
}
|
||||
|
||||
var signature int
|
||||
var signature pmapi.SignatureFlag
|
||||
if sendPreferences.Sign {
|
||||
signature = pmapi.SignatureDetached
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user