AnsweredAssumed Answered

MamManager pageBefore problem

Question asked by Vladan on Mar 8, 2017
Latest reply on Mar 9, 2017 by Vladan

I have 30 messages in chat archive. Ids are 1, 2, 3, 4, 5, 6,...., 30.

mostRecentPage(chatJid, 5) calls pageBefore(chatJid, "", 5) and everything is ok. I have 5 last messages from the archive. 30, 29, 28, 27, 26.

But when I call pageBefore(chatJid, 26, 5) I did not get 5 older conversation but nothing (number of messages from the archive is 0). Shall be something like:

pageBefore(chatJid, 26, 5) = 25, 24, 23, 21, 20

pageBefore(chatJid, 20, 5) = 19, 18, 17, 16, 15

But it's not. I'm always getting 0 for the result list size:

List<Forwarded> forwardedMessages = mamQueryResult.forwardedMessages;

forwardedMessages.size() = 0;

How can I navigate 5 by 5 messages backwards?

Outcomes