From daf7e6224f5d54d58ec6f254d6e42995366259e5 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 16 Aug 2019 15:29:58 +0200 Subject: [PATCH] fixed pgp decryption of automatically accepted jingle ft --- .../eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 45411ef62..e44d85056 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -119,6 +119,8 @@ public class JingleConnection implements Transferable { } Log.d(Config.LOGTAG, "successfully transmitted file:" + file.getAbsolutePath() + " (" + CryptoHelper.bytesToHex(file.getSha1Sum()) + ")"); return; + } else if (message.getEncryption() == Message.ENCRYPTION_PGP) { + account.getPgpDecryptionService().decrypt(message, true); } } else { if (ftVersion == Content.Version.FT_5) { //older Conversations will break when receiving a session-info @@ -423,7 +425,7 @@ public class JingleConnection implements Transferable { } else if (VALID_CRYPTO_EXTENSIONS.contains(extension.main)) { if (VALID_IMAGE_EXTENSIONS.contains(extension.secondary)) { message.setType(Message.TYPE_IMAGE); - message.setRelativeFilePath(message.getUuid() + "." + extension.main); + message.setRelativeFilePath(message.getUuid() + "." + extension.secondary); } else { message.setType(Message.TYPE_FILE); message.setRelativeFilePath(message.getUuid() + (extension.secondary != null ? ("." + extension.secondary) : ""));