diff options
author | steckbrief <steckbrief@chefmail.de> | 2018-05-10 20:03:46 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2018-05-10 20:03:46 +0200 |
commit | ae30167461b89e7362d1ec5e77c14ec7640c537e (patch) | |
tree | df7f90c591c92214bb2ee99bc06233e962344cb5 /src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java | |
parent | 9d5197223924ca3b51afe016d1f68119d244a1b4 (diff) |
moves delay element references to xmpp package
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java index 13494baf..d402fa45 100644 --- a/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java +++ b/src/main/java/de/thedevstack/conversationsplus/generator/MessageGenerator.java @@ -17,6 +17,7 @@ import de.thedevstack.conversationsplus.entities.Message; import de.thedevstack.conversationsplus.xml.Element; import de.thedevstack.conversationsplus.xmpp.carbons.Carbons; import de.thedevstack.conversationsplus.xmpp.chatstate.ChatState; +import de.thedevstack.conversationsplus.xmpp.delay.Delay; import de.thedevstack.conversationsplus.xmpp.httpuploadim.HttpUploadHint; import de.thedevstack.conversationsplus.xmpp.jid.Jid; import de.thedevstack.conversationsplus.xmpp.openpgp.OpenPgpXep; @@ -28,7 +29,7 @@ public class MessageGenerator extends AbstractGenerator { /** * Moved to messaging.MessageGenerator */ - private MessagePacket preparePacket(Message message) { + protected MessagePacket preparePacket(Message message) { Conversation conversation = message.getConversation(); Account account = conversation.getAccount(); MessagePacket packet = new MessagePacket(); @@ -59,7 +60,7 @@ public class MessageGenerator extends AbstractGenerator { final SimpleDateFormat mDateFormat = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US); mDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - Element delay = packet.addChild("delay", "urn:xmpp:delay"); + Element delay = packet.addChild(Delay.DELAY.getXmlElement()); Date date = new Date(timestamp); delay.setAttribute("stamp", mDateFormat.format(date)); } |