diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-11-26 17:44:11 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-11-26 17:44:11 +0100 |
commit | 23ef1c660a828c58e12a9134e0de2d012496cdc2 (patch) | |
tree | 5aa9e8e135d9020ff6f7291345219d00aa6bc47d | |
parent | fd6ed5b98984fa09f98b78cbe3e782a497c62c19 (diff) |
encrypt pgp messages to self
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/PgpEngine.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java index 797a75b01..624d1b139 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java @@ -130,18 +130,18 @@ public class PgpEngine { } } - public void encrypt(final Message message, - final UiCallback<Message> callback) { - + public void encrypt(final Message message, final UiCallback<Message> callback) { Intent params = new Intent(); params.setAction(OpenPgpApi.ACTION_ENCRYPT); - if (message.getConversation().getMode() == Conversation.MODE_SINGLE) { - long[] keys = { message.getConversation().getContact() - .getPgpKeyId() }; + final Conversation conversation = message.getConversation(); + if (conversation.getMode() == Conversation.MODE_SINGLE) { + long[] keys = { + conversation.getContact().getPgpKeyId(), + conversation.getAccount().getPgpId() + }; params.putExtra(OpenPgpApi.EXTRA_KEY_IDS, keys); } else { - params.putExtra(OpenPgpApi.EXTRA_KEY_IDS, message.getConversation() - .getMucOptions().getPgpKeyIds()); + params.putExtra(OpenPgpApi.EXTRA_KEY_IDS, conversation.getMucOptions().getPgpKeyIds()); } if (!message.needsUploading()) { |