diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-09-15 22:52:35 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-09-15 22:52:39 +0200 |
commit | b9002d7fd5455ca2c13934748531b30a97799a9f (patch) | |
tree | 09642f70f234a7aad727385fbdd75c2764966d40 /src/main/java/eu/siacs/conversations/generator | |
parent | b5719fd747a9a6d9757eccb0f20c22c2daaa9928 (diff) |
added missing type='submit' to mam queries
fixed some nasty inheritance problems along the way
fixes #1411
Diffstat (limited to 'src/main/java/eu/siacs/conversations/generator')
-rw-r--r-- | src/main/java/eu/siacs/conversations/generator/IqGenerator.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java index 898d218e..835b9bf6 100644 --- a/src/main/java/eu/siacs/conversations/generator/IqGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/IqGenerator.java @@ -176,7 +176,7 @@ 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"); - query.setAttribute("queryid",mam.getQueryId()); + query.setAttribute("queryid", mam.getQueryId()); final Data data = new Data(); data.setFormType("urn:xmpp:mam:0"); if (mam.muc()) { @@ -184,8 +184,9 @@ public class IqGenerator extends AbstractGenerator { } else if (mam.getWith()!=null) { data.put("with", mam.getWith().toString()); } - data.put("start",getTimestamp(mam.getStart())); - data.put("end",getTimestamp(mam.getEnd())); + data.put("start", getTimestamp(mam.getStart())); + data.put("end", getTimestamp(mam.getEnd())); + data.submit(); query.addChild(data); if (mam.getPagingOrder() == MessageArchiveService.PagingOrder.REVERSE) { query.addChild("set", "http://jabber.org/protocol/rsm").addChild("before").setContent(mam.getReference()); |