From 3889c0eb01f9d412afcc3e11c6e7579216301480 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 1 Jun 2017 07:35:18 +0200 Subject: [PATCH] use application/pgp-encrypted mime type when necessary for http upload --- .../eu/siacs/conversations/http/HttpUploadConnection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java index 8884330e6..e56c314e0 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java @@ -96,7 +96,11 @@ public class HttpUploadConnection implements Transferable { this.message = message; this.account = message.getConversation().getAccount(); this.file = mXmppConnectionService.getFileBackend().getFile(message, false); - this.mime = this.file.getMimeType(); + if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { + this.mime = "application/pgp-encrypted"; + } else { + this.mime = this.file.getMimeType(); + } this.delayed = delay; if (Config.ENCRYPT_ON_HTTP_UPLOADED || message.getEncryption() == Message.ENCRYPTION_AXOLOTL