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 /src/main/java/eu | |
parent | ca1cae4fac53c3f52ff987f8ea6098e1790709d9 (diff) |
Fixed errors with notificationstrz/beta-7
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/parser/MessageParser.java | 9 |
1 files changed, 6 insertions, 3 deletions
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); |