From 8952684472eac14967134279bcc39cbff7f55a7b Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Thu, 14 Mar 2019 08:34:22 +0100 Subject: Add hints about trust command when printing fingerprints --- src/omemo/omemo.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index f360232f..b8307352 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -438,7 +438,12 @@ omemo_start_device_session(const char *const jid, uint32_t device_id, if (g_strcmp0(jid, ownjid->barejid) == 0) { char *fingerprint = omemo_fingerprint(identity_key, TRUE); - cons_show("Available device identity: %s%s", fingerprint, trusted ? " (trusted)" : ""); + cons_show("Available device identity for %s: %s%s", ownjid->barejid, fingerprint, trusted ? " (trusted)" : ""); + if (trusted) { + cons_show("You can untrust it with '/omemo untrust %s '", ownjid->barejid); + } else { + cons_show("You can trust it with '/omemo trust %s '", ownjid->barejid); + } free(fingerprint); } @@ -447,6 +452,11 @@ omemo_start_device_session(const char *const jid, uint32_t device_id, char *fingerprint = omemo_fingerprint(identity_key, TRUE); win_println((ProfWin *)chatwin, THEME_DEFAULT, '-', "Available device identity: %s%s", fingerprint, trusted ? " (trusted)" : ""); + if (trusted) { + win_println((ProfWin *)chatwin, THEME_DEFAULT, '-', "You can untrust it with '/omemo untrust '"); + } else { + win_println((ProfWin *)chatwin, THEME_DEFAULT, '-', "You can trust it with '/omemo trust '"); + } free(fingerprint); } -- cgit 1.4.1-2-gfad0