igniterealtime/openfire-monitoring-plugin

Paging backwards throught the result set reverses message order

fenuz opened this issue · 1 comments

fenuz commented

When paging backwards through a result set using XEP-0059 <before /> to request the last page of the result set, the messages returned are in reverse order (newest first, oldest last). The <flip-page/> defined by XEP-0313 for extended MAMv2 is not used (and not supported anyway afaik).

I guess this happens because the SQL queried to retrieve the results reverses the order in case we are paging backwards to get to the last page, but the page results are not reversed again before returning them to the client.

Perhaps this is a duplicate of #165?

I think it is a duplicate, yeah, but this info was useful in getting to the bottom of it.
I've opened a PR to fix it - #173.