MAM request in MUC with RSM backwards-paging does not backward page
Description
MAM is used to retrieve message archives. As archives can get quite large, clients can specify what part of the archive they'd like to obtain. That's done using RSM. One of the options provided by RSM is to 'page backwards', meaning: get the messages just before a certain index or element.
Our MUC MAM RSM (... yeah!) implementation does not handle this correctly. When a client asks for 'the last 50 results', it actually receives the first 50 results instead.
MAM is used to retrieve message archives. As archives can get quite large, clients can specify what part of the archive they'd like to obtain. That's done using RSM. One of the options provided by RSM is to 'page backwards', meaning: get the messages just before a certain index or element.
Our MUC MAM RSM (... yeah!) implementation does not handle this correctly. When a client asks for 'the last 50 results', it actually receives the first 50 results instead.