igniterealtime/openfire-monitoring-plugin

Smack history queryLastPage() return the first page, not the last page

Closed this issue · 1 comments

Smack version 4.3.4
Openfire version 4.4.0
plugin 1.8.0

When trying to get the last page of history, the plugin returns the first page instead.

If this relates to "one-on-one" archives, then this issue is solved by #76.

I've also tried to reproduce it on my working copy of this plugin (which contains much of the fixes that go into the next release, likely to be numbered 2.0.0. With this code, I can not reproduce the problem:

final MultiUserChat multiUserChat = MultiUserChatManager
        .getInstanceFor(connection)
        .getMultiUserChat(jid);

final MamManager mamManager = MamManager.getInstanceFor(multiUserChat );
final MamManager.MamQueryArgs query = MamManager.MamQueryArgs.builder()
        .setResultPageSizeTo(4)
        .queryLastPage()
        .build();

MamManager.MamQuery mamQuery = mamManager.queryArchive(query);