diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-04-17 21:08:14 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-04-17 21:08:14 +0200 |
commit | d94eb9309b4ab3ee1dfd3cee637b47a52223e15b (patch) | |
tree | a8904048cdc7200addba3a715357a55dc38f7100 /src/main/java/de/thedevstack/conversationsplus/parser | |
parent | c854f659dbf03ac92f3cb5539b4b424a993acfac (diff) |
DatabaseBackend updated to serve Conversatiosn Database version and Conversations+ Database version
HttpUpload Flag introduced for message to identify if a link was sent after httpupload
message hint for httpupload added (message parsing and message generating)
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/parser')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java | 4 |
1 files changed, 3 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 6fb18266..4e70ab65 100644 --- a/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java +++ b/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java @@ -3,6 +3,7 @@ package de.thedevstack.conversationsplus.parser; import android.util.Log; import android.util.Pair; +import de.thedevstack.conversationsplus.xmpp.httpuploadim.HttpUploadHint; import de.tzur.conversations.Settings; import net.java.otr4j.session.Session; @@ -390,6 +391,7 @@ public class MessageParser extends AbstractParser implements if (serverMsgId == null) { serverMsgId = extractStanzaId(packet, isTypeGroupChat ? conversation.getJid().toBareJid() : account.getServer()); } + message.setHttpUploaded(packet.hasChild(HttpUploadHint.ELEMENT_NAME, HttpUploadHint.NAMESPACE)); message.setCounterpart(counterpart); message.setRemoteMsgId(remoteMsgId); @@ -465,7 +467,7 @@ public class MessageParser extends AbstractParser implements if (message.trusted() && message.treatAsDownloadable() != Message.Decision.NEVER && ConversationsPlusPreferences.autoAcceptFileSize() > 0 - && ConversationsPlusPreferences.autoDownloadFileLink()) { + && (message.isHttpUploaded() || ConversationsPlusPreferences.autoDownloadFileLink())) { this.mXmppConnectionService.getHttpConnectionManager().createNewDownloadConnection(message); } else { if (query == null) { |