struct AutocryptAccount *account = NULL;
bool done = false;
int rc = -1;
+ int prefer_encrypt = 0;
mutt_debug(LL_DEBUG1, "In mutt_autocrypt_account_init\n");
if (mutt_yesorno(_("Create an initial autocrypt account?"), MUTT_YES) != MUTT_YES)
if (mutt_autocrypt_gpgme_create_key(addr, keyid, keydata))
goto cleanup;
- /* TODO: prompt for prefer_encrypt value? */
- if (mutt_autocrypt_db_account_insert(addr, mutt_b2s(keyid), mutt_b2s(keydata), 0))
+ /* L10N:
+ Autocrypt has a setting "prefer-encrypt".
+ When the recommendation algorithm returns "available" and BOTH
+ sender and recipient choose "prefer-encrypt", encryption will be
+ automatically enabled.
+ Otherwise the UI will show encryption is "available" but the user
+ will be required to enable encryption manually.
+ */
+ if (mutt_yesorno(_("Prefer encryption?"), MUTT_NO) == MUTT_YES)
+ prefer_encrypt = 1;
+
+ if (mutt_autocrypt_db_account_insert(addr, mutt_b2s(keyid), mutt_b2s(keydata), prefer_encrypt))
goto cleanup;
rc = 0;