diff options
-rw-r--r-- | src/command/cmd_funcs.c | 3 | ||||
-rw-r--r-- | src/omemo/omemo.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 63c3df1b..ba55243c 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8049,7 +8049,8 @@ cmd_omemo_trust(ProfWin *window, const char *const command, gchar **args) assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); barejid = chatwin->barejid; } else { - char *contact = args[2]; + fingerprint = args[2]; + char *contact = args[1]; barejid = roster_barejid_from_name(contact); if (barejid == NULL) { barejid = contact; diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index 3cae3315..b45e1834 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -440,6 +440,15 @@ omemo_start_device_session(const char *const jid, uint32_t device_id, gboolean trusted = is_trusted_identity(&address, (uint8_t *)identity_key_raw, identity_key_len, &omemo_ctx.identity_key_store); + xmpp_ctx_t * const ctx = connection_get_ctx(); + char *ownjid = xmpp_jid_bare(ctx, session_get_account_name()); + if (g_strcmp0(jid, ownjid) == 0) { + char *fingerprint = omemo_fingerprint(identity_key, TRUE); + + cons_show("Available device identity: %s%s", fingerprint, trusted ? " (trusted)" : ""); + free(fingerprint); + } + ProfChatWin *chatwin = wins_get_chat(jid); if (chatwin) { char *fingerprint = omemo_fingerprint(identity_key, TRUE); |