diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-01-04 23:27:10 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-01-04 23:27:10 +0100 |
commit | 28676d3048eaf52260101cf6390c12479192e892 (patch) | |
tree | 85c0c8ac9fff84e78b7554c8f9c69a8d1a9cc76a | |
parent | ca1cae4fac53c3f52ff987f8ea6098e1790709d9 (diff) |
Fixed errors with notificationstrz/beta-7
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 9 |
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); |