diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-08-06 14:28:00 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-08-06 14:28:00 +0200 |
commit | be1992ce897d3b0551e545646a3e0f45cc6dd8c2 (patch) | |
tree | c15c94ade61e5063095d8b429ae4acf85459493f /src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java | |
parent | f8e083a32cb7232c9601f5011b14738d43bb3b06 (diff) |
Implements XEP-0202 Entity Time, moves Software Version to xmpp package, moves namespace definitions for mam, carbons and avatar to xmpp package
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java index e3e13328..aa279e40 100644 --- a/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java +++ b/src/main/java/de/thedevstack/conversationsplus/generator/IqGenerator.java @@ -25,6 +25,7 @@ import de.thedevstack.conversationsplus.utils.Xmlns; import de.thedevstack.conversationsplus.xml.Element; import de.thedevstack.conversationsplus.xmpp.forms.Data; import de.thedevstack.conversationsplus.xmpp.jid.Jid; +import de.thedevstack.conversationsplus.xmpp.mam.Mam; import de.thedevstack.conversationsplus.xmpp.stanzas.IqPacket; public class IqGenerator extends AbstractGenerator { @@ -46,14 +47,6 @@ public class IqGenerator extends AbstractGenerator { return packet; } - public IqPacket versionResponse(final IqPacket request) { - final IqPacket packet = request.generateResponse(IqPacket.TYPE.RESULT); - Element query = packet.query("jabber:iq:version"); - query.addChild("name").setContent(ConversationsPlusApplication.getName()); - query.addChild("version").setContent(ConversationsPlusApplication.getVersion()); - return packet; - } - protected IqPacket publish(final String node, final Element item) { final IqPacket packet = new IqPacket(IqPacket.TYPE.SET); final Element pubsub = packet.addChild("pubsub", @@ -155,10 +148,10 @@ public class IqGenerator extends AbstractGenerator { public IqPacket queryMessageArchiveManagement(final MessageArchiveService.Query mam) { final IqPacket packet = new IqPacket(IqPacket.TYPE.SET); - final Element query = packet.query("urn:xmpp:mam:0"); + final Element query = packet.query(Mam.NAMESPACE); query.setAttribute("queryid", mam.getQueryId()); final Data data = new Data(); - data.setFormType("urn:xmpp:mam:0"); + data.setFormType(Mam.NAMESPACE); if (mam.muc()) { packet.setTo(mam.getWith()); } else if (mam.getWith()!=null) { |