use application/pgp-encrypted mime type when necessary for http upload

This commit is contained in:
Daniel Gultsch 2017-06-01 07:35:18 +02:00
parent 9dcd0bf16b
commit 3889c0eb01
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ public class HttpUploadConnection implements Transferable {
this.message = message;
this.account = message.getConversation().getAccount();
this.file = mXmppConnectionService.getFileBackend().getFile(message, false);
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