about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-08-25 23:04:21 +0100
committerJames Booth <boothj5@gmail.com>2015-08-25 23:04:21 +0100
commit55c2d1cc21974936e5b431de49ae81e6fc3845be (patch)
tree1c41a0ce6af402503a4b6bc3f06ab040a18fc89d /src/command
parentfc1ee79190e05ec7682d3a52c27075142c887445 (diff)
downloadprofani-tty-55c2d1cc21974936e5b431de49ae81e6fc3845be.tar.gz
PGP: Display whether contact public key was received or manually set
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c4
-rw-r--r--src/command/commands.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 95fff417..58a2e295 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1157,8 +1157,8 @@ static struct cmd_t command_defs[] =
         CMD_ARGS(
             { "libver",                   "Show which version of the libgpgme library is being used." },
             { "keys",                     "List all keys known to the system." },
-            { "contacts",                      "Show contacts with assigned public keys." },
-            { "setkey <contact> <keyid>", "Manually associate a key ID with a JID." },
+            { "contacts",                 "Show contacts with assigned public keys." },
+            { "setkey <contact> <keyid>", "Manually associate a contact with a public key." },
             { "start [<contact>]",        "Start PGP encrypted chat, current contact will be used if not specified." },
             { "end",                      "End PGP encrypted chat with the current recipient." },
             { "log on|off",               "Enable or disable plaintext logging of PGP encrypted messages." },
diff --git a/src/command/commands.c b/src/command/commands.c
index 5143329e..99770abd 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -4287,8 +4287,12 @@ cmd_pgp(ProfWin *window, const char * const command, gchar **args)
         GList *curr = jids;
         while (curr) {
             char *jid = curr->data;
-            char *pubkey = g_hash_table_lookup(pubkeys, jid);
-            cons_show("  %s: %s", jid, pubkey);
+            ProfPGPPubKeyId *pubkeyid = g_hash_table_lookup(pubkeys, jid);
+            if (pubkeyid->received) {
+                cons_show("  %s: %s (received)", jid, pubkeyid->id);
+            } else {
+                cons_show("  %s: %s (stored)", jid, pubkeyid->id);
+            }
             curr = g_list_next(curr);
         }
         g_list_free(jids);