aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/generator
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-04-17 21:08:14 +0200
committersteckbrief <steckbrief@chefmail.de>2016-04-17 21:08:14 +0200
commitd94eb9309b4ab3ee1dfd3cee637b47a52223e15b (patch)
treea8904048cdc7200addba3a715357a55dc38f7100 /src/main/java/de/thedevstack/conversationsplus/generator
parentc854f659dbf03ac92f3cb5539b4b424a993acfac (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/generator')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java
index 2e49ebfe..5a1d6f3f 100644
--- a/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java
+++ b/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java
@@ -16,6 +16,7 @@ import de.thedevstack.conversationsplus.entities.Conversation;
import de.thedevstack.conversationsplus.entities.Message;
import de.thedevstack.conversationsplus.xml.Element;
import de.thedevstack.conversationsplus.xmpp.chatstate.ChatState;
+import de.thedevstack.conversationsplus.xmpp.httpuploadim.HttpUploadHint;
import de.thedevstack.conversationsplus.xmpp.jid.Jid;
import de.thedevstack.conversationsplus.xmpp.stanzas.MessagePacket;
@@ -112,6 +113,9 @@ public class MessageGenerator extends AbstractGenerator {
if (message.hasFileOnRemoteHost()) {
Message.FileParams fileParams = message.getFileParams();
content = fileParams.url.toString();
+ if (message.isHttpUploaded()) {
+ packet.addChild(new HttpUploadHint());
+ }
packet.addChild("x","jabber:x:oob").addChild("url").setContent(content);
if (fileParams.width > 0 && fileParams.height > 0) {
addXhtmlImImage(packet,fileParams);