I am using ejabberd strophe js for chat application in angular. . This what i tried for MAM:
const iqStanza = $iq({
type: 'set'
}).c('query', { xmlns: 'urn:xmpp:mam:2' })
.c('x', { xmlns: 'jabber:x:data', type: 'submit' })
.c('field', { var: 'FORM_TYPE', type: 'hidden' })
.c('value').t('urn:xmpp:mam:2').up().up()
.c('field', { var: 'start' })
.c('value').t('2023-07-01T00:00:00Z').up().up()
.c('set', { xmlns: 'http://jabber.org/protocol/rsm' })
.c('max').t('5');
I can get all message using MAM. But i could not implement paging using RSM(XEP0059) when scrolling. Any way is available to achieve paging when scrolling chats?