How i can retrieve last conversation and last message in conversation?
According to "XEP-0059: Result Set Management", i need to send this requests:
For last conversation:
<iq type='get' id='juliet1'>
<list xmlns='urn:xmpp:archive'
<max>1</max>
<before/>
</set>
</list>
</iq>
For last message in conversation:
<iq type='get' id='page1'>
<retrieve xmlns='urn:xmpp:archive'
start='1469-07-21T02:56:15Z'>
<max>1</max>
<before/>
</set>
</retrieve>
</iq>
But both requests returns first record record instead of last...
Does OpenArchive plugin handle XEP-0059 requests correctly?
After some kind of experiments i figured out that i can request last conversation using this request:
<iq type='get' id='juliet1'>
<list xmlns='urn:xmpp:archive'
<max>1</max>
<before>999999999999</before>
</set>
</list>
</iq>
But i can't retrieve last message using this method... It returns only empty answer.
PS: Please help me figure out how to retrieve last message in conversation using only one request. Thank you.