I'm writing an xmpp messenger. By my design it stores local message history. When the user comes online and opens the dialog with someone my program requests archive (XEP-313) from the last locally stored message to the last message the server archive has, using "after" tag. However it isn't working the way I expected it to.
The request
<iq id="qxmpp21" type="set">
<query xmlns="urn:xmpp:mam:1" queryid="qxmpp21">
<x xmlns="jabber:x:data" type="submit">
<field type="hidden" var="FORM_TYPE"><value>urn:xmpp:mam:1</value></field>
<field type="text-single" var="with"><value>user1@domain.org</value></field>
</x>
<set xmlns="http://jabber.org/protocol/rsm">
<max>100</max>
<after>5d10ba97-9ce8-46d4-9547-4f5e91e4ac19</after>
</set>
</query>
</iq>
The response
<iq xmlns="jabber:client" id="qxmpp21" xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace" type="result" from="user2@domain.org" to="user2@domain.org/QXmpp">
<fin xmlns="urn:xmpp:mam:1" queryid="qxmpp21" complete="true">
<set xmlns="http://jabber.org/protocol/rsm">
<count xmlns="http://jabber.org/protocol/rsm">465</count>
</set>
</fin>
</iq>
I use qxmpp library and ejabberd as a server.
Am I doing anything wrong? Thanks in advance!