Request:
<iq type='get' id='page1'>
<retrieve xmlns='urn:xmpp:archive'
with='room@app.shmakov.voximplant.com'
start='2015-07-01T09:35:48.646Z'>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>3</max>
<before/>
</set>
</retrieve>
</iq>
Reponse (invalid):
<iq type="result" id="page1" to="111(app.shmakov)@voximplant.com/QIP">
<chat xmlns="urn:xmpp:archive" with="room@app.shmakov.voximplant.com" start="2015-07-01T09:35:48.646Z"/>
</iq>
Should be valid:
<iq type="result" id="page1" to="111(app.shmakov)@voximplant.com/QIP">
<chat xmlns="urn:xmpp:archive" with="room@app.shmakov.voximplant.com" start="2015-07-01T09:35:48.646Z">
<to secs="204">
<body>Pre-Pre-Last Message</body>
</to>
<to secs="205">
<body>Pre-Last Message</body>
</to>
<to secs="206">
<body>Last Message</body>
</to>
<set xmlns="http://jabber.org/protocol/rsm">
<first index="102">102</first>
<last>104</last>
<count>105</count>
</set>
</chat>
</iq>
XEP-0059: Result Set Management
2.5 Requesting 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.
Example 11. Requesting the Last Page of a Result Set
<iq type='set' from='stpeter@jabber.org/roundabout' to='users.jabber.org' id='page1'>
<query xmlns='jabber:iq:search'>
<nick>Pete</nick>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>10</max>
<before/>
</set>
</query>
</iq>