encrypt pgp messages to self

This commit is contained in:
Daniel Gultsch 2015-11-26 17:44:11 +01:00
parent fd6ed5b989
commit 23ef1c660a
1 changed files with 8 additions and 8 deletions

View File

@ -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()) {