aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-09-29 11:57:16 +0200
committersteckbrief <steckbrief@chefmail.de>2016-09-29 11:57:16 +0200
commit34fcdda53fa8ae1174909b62860534d2d874eb72 (patch)
tree50564c1d946ef1779567c67ad25a646b446a6403 /src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java
parent297bed106efdfa619d700ae44ce047d7f2663c93 (diff)
Implements FS#235: Deletion of remote files uploaded via httpupload
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java b/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java
index 2f1701df..b02677a8 100644
--- a/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java
+++ b/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java
@@ -3,6 +3,8 @@ package de.thedevstack.conversationsplus.parser;
import android.util.Log;
import android.util.Pair;
+import de.thedevstack.conversationsplus.entities.FileParams;
+import de.thedevstack.conversationsplus.enums.FileStatus;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.xmpp.httpuploadim.HttpUploadHint;
import de.tzur.conversations.Settings;
@@ -10,7 +12,6 @@ import de.tzur.conversations.Settings;
import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus;
-import java.net.URL;
import java.util.ArrayList;
import java.util.Set;
@@ -472,6 +473,10 @@ public class MessageParser extends AbstractParser implements
&& message.treatAsDownloadable() != Message.Decision.NEVER
&& ConversationsPlusPreferences.autoAcceptFileSize() > 0
&& (message.isHttpUploaded() || ConversationsPlusPreferences.autoDownloadFileLink())) {
+ FileParams fileParams = new FileParams();
+ fileParams.setFileStatus(FileStatus.NEEDS_DOWNLOAD);
+ fileParams.setUrl(message.getBody());
+ message.setFileParams(fileParams);
HttpConnectionManager.createNewDownloadConnection(message);
} else {
if (query == null) {