PGP: Also encrypt using sender public key

This commit is contained in:
James Booth
2016-03-29 21:24:37 +01:00
parent 18555ffcb4
commit 7b138b71db
3 changed files with 31 additions and 12 deletions

View File

@@ -163,7 +163,7 @@ message_send_chat_pgp(const char *const barejid, const char *const msg)
ProfAccount *account = accounts_get_account(account_name);
if (account->pgp_keyid) {
Jid *jidp = jid_create(jid);
char *encrypted = p_gpg_encrypt(jidp->barejid, msg);
char *encrypted = p_gpg_encrypt(jidp->barejid, msg, account->pgp_keyid);
if (encrypted) {
message = stanza_create_message(ctx, id, jid, STANZA_TYPE_CHAT, "This message is encrypted.");
xmpp_stanza_t *x = xmpp_stanza_new(ctx);