1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Allow to trust own device id

This commit is contained in:
Paul Fariello 2019-03-13 18:04:45 +01:40
parent 063a5d1c52
commit dbf96dcfc6
2 changed files with 11 additions and 1 deletions

View File

@ -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;

View File

@ -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);