fix(GODT-749): don't force pgp/inline when sending plaintext

This commit is contained in:
James Houlahan 2020-10-01 10:47:39 +02:00
parent 68616e470c
commit dc9851f8ea
2 changed files with 3 additions and 7 deletions

View File

@ -4,6 +4,9 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
## Unreleased
### Fixed
* GODT-749 Don't force PGP/Inline when sending plaintext messages.
### Changed
* Bump crypto version to v0.0.0-20200818122824-ed5d25e28db8

View File

@ -503,13 +503,6 @@ func (b *sendPreferencesBuilder) setEncryptionPreferences(mailSettings pmapi.Mai
}
func (b *sendPreferencesBuilder) setMIMEPreferences(composerMIMEType string) {
// If the sign flag (that we just determined above) is true we use the scheme
// in the encryption preferences, unless the plain text format has been
// selected in the composer, in which case we must enforce PGP/INLINE.
if !b.isInternal() && b.shouldSign() && composerMIMEType == "text/plain" {
b.withScheme(pgpInline)
}
// If the sign flag (that we just determined above) is true, then the MIME
// type is determined by the PGP scheme (also determined above): we should
// use 'text/plain' for a PGP/Inline scheme, and 'multipart/mixed' otherwise.