I am reading http://xmpp.org/extensions/xep-0313.html for an Ejabberd request for messages archived with a specific user.
This is the xml I'm posting:
<iq type='get' id='get_archive_user1'> <query xmlns='urn:xmpp:mam:tmp'> <with> user1@localhost </with> <set xmlns='http://jabber.org/protocol/rsm'> <max>20</max> </set> </query> </iq>
I get the first 20 messages correctly. To request again, I add a tag:
<after>(id in element "Last" from last request)</after>
and that works fine too. I need to get the last 20 posts, not the first 20 posts. How can I achieve this?
source share