summaryrefslogtreecommitdiffstats
path: root/autocrypt
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2019-07-26 15:59:47 -0700
committerKevin McCarthy <kevin@8t8.us>2019-08-03 14:08:09 -0700
commitbaac6d681be30051e9a61036a00c28d893fa9ddc (patch)
treeb33e794393d2ba576a892fab1be063e4cc668a35 /autocrypt
parent2aec979b267efb2f82b5cb5f433948d3395932b8 (diff)
Print an error message if an autocrypt key can't be found.
Diffstat (limited to 'autocrypt')
-rw-r--r--autocrypt/autocrypt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/autocrypt/autocrypt.c b/autocrypt/autocrypt.c
index f53f8748..ed3c1024 100644
--- a/autocrypt/autocrypt.c
+++ b/autocrypt/autocrypt.c
@@ -487,7 +487,16 @@ autocrypt_rec_t mutt_autocrypt_ui_recommendation (HEADER *hdr, char **keylist)
for (recip = recips; recip; recip = recip->next)
{
if (mutt_autocrypt_db_peer_get (recip, &peer) <= 0)
+ {
+ if (keylist)
+ /* L10N:
+ %s is an email address. Autocrypt is scanning for the keyids
+ to use to encrypt, but it can't find a valid keyid for this address.
+ The message is printed and they are returned to the compose menu.
+ */
+ mutt_message (_("No (valid) autocrypt key found for %s."), recip->mailbox);
goto cleanup;
+ }
if (mutt_autocrypt_gpgme_is_valid_key (peer->keyid))
{
@@ -511,7 +520,11 @@ autocrypt_rec_t mutt_autocrypt_ui_recommendation (HEADER *hdr, char **keylist)
all_encrypt = 0;
}
else
+ {
+ if (keylist)
+ mutt_message (_("No (valid) autocrypt key found for %s."), recip->mailbox);
goto cleanup;
+ }
if (mutt_buffer_len (keylist_buf))
mutt_buffer_addch (keylist_buf, ' ');