I, as usual search all over the internet looking for documentation on a given functionality using strophe or one of the plugins. In this case is this: https://github.com/strophe/strophejs-plugins/blob/master/archive/strophe.archive.js. It might be that the specification on RSM is a bit over my head, but basically, if using this pluggin, how does one get all messages between the user and another user over a period of time. I found this to be the only sample code available: https://groups.google.com/forum/#!searchin/strophe/RSM/strophe/BjHUyxb-sYI/Ow-7ELNxNQoJ
And on a side note, due the lack of current development and strong documentation on strophe, plugins and what not, is this something almost nobody uses anymore?
Here: After tweaking the piece of code I linked I managed to get it working, sort of. I did not want (at the moment) to limit the result set but the second parameter and the rsm vars are for that. Also, once you get the collections, there is a callback, you can iterate the collections and get the messages. Somecallback should process the messages. Strophe RSM pluggins is needed here and I think internally by the archive plugin.
Notice the original plugin doesn't have the fromDate parameter. I needed it to add it to the list element so it would only retrieve from that date.