fix(GODT-3048): WKD Policy behavior

Ensure Bridge respects the no encrypt setting on a contact which has a
WKD key.
This commit is contained in:
Leander Beernaert
2023-11-08 13:28:32 +01:00
parent e8d9534b9c
commit 4a01c46aed
5 changed files with 93 additions and 20 deletions

View File

@ -505,12 +505,15 @@ func (s *Service) getRecipients(
return proton.SendPreferences{}, fmt.Errorf("failed to get contact settings for %v: %w", recipient, err)
}
s.log.Infof("ContactSettings=%v", contactSettings)
return buildSendPrefs(contactSettings, settings, pubKeys, draft.MIMEType, recType == proton.RecipientTypeInternal)
})
if err != nil {
return nil, fmt.Errorf("failed to get send preferences: %w", err)
}
s.log.Infof("Settings=%v", prefs)
recipients := make(recipients)
for idx, pref := range prefs {