I\'m reading http://xmpp.org/extensions/xep-0313.html to query Ejabberd for messages archived with a certain user.
This is the xml that I\'m sending:
XEP-0313 Message Archive Management rely on XEP-0059 Result Set Management for pagination.
RSM specification explains how to get the last page in a Result Set:
The requesting entity MAY ask for the last page in a result set by including in its request an empty
element, and the maximum number of items to return.
It means you need to add an empty
element in your result set query.
Here is an example based on XEP-0313 version 0.4 on how to get the last 20 messages in a conversation with a given user. The query limit is defined by the parameter max
(it defined the size of the pages).
urn:xmpp:mam:0
juliet@capulet.lit
20