aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle4
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java9
2 files changed, 8 insertions, 5 deletions
diff --git a/build.gradle b/build.gradle
index a58ccfd9..7b82e6fd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -78,8 +78,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
- versionCode 190
- versionName "beta-6"
+ versionCode 191
+ versionName "beta-7"
archivesBaseName += "-$versionName"
apply from: 'configuration.gradle'
}
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index e194f503..b68e7014 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -29,6 +29,7 @@ import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.MucOptions;
+import eu.siacs.conversations.http.HttpConnectionManager;
import eu.siacs.conversations.services.AvatarService;
import eu.siacs.conversations.services.MessageArchiveService;
import eu.siacs.conversations.services.XmppConnectionService;
@@ -470,14 +471,16 @@ public class MessageParser extends AbstractParser implements
}
MessageUtil.extractFileParamsFromBody(message);
FileParams fileParams = message.getFileParams();
- if (message.treatAsDownloadable() != Message.Decision.NEVER) {
- fileParams.setFileStatus(FileStatus.NEEDS_DOWNLOAD);
+ if (message.treatAsDownloadable() != Message.Decision.NEVER && message.treatAsDownloadable() != Message.Decision.NOT_DECIDED) {
+ if (null != fileParams) {
+ fileParams.setFileStatus(FileStatus.NEEDS_DOWNLOAD);
+ }
}
if (message.trusted()
&& message.treatAsDownloadable() != Message.Decision.NEVER
&& ConversationsPlusPreferences.autoAcceptFileSize() > 0
&& (message.isHttpUploaded() || ConversationsPlusPreferences.autoDownloadFileLink())) {
- // Download this message in MessageAdapter
+ HttpConnectionManager.createNewDownloadConnection(message);
} else {
if (query == null) {
mXmppConnectionService.getNotificationService().push(message);