From 0332fa54d10ff357e40ebd979364ca4da6181fb8 Mon Sep 17 00:00:00 2001 From: Tairs Rzajevs Date: Thu, 15 Nov 2018 15:18:17 +0200 Subject: [PATCH] Fix previous archive page requested incorrectly in MamManager Previous page should be before the first message in the previous result set, not the last. Fixes SMACK-843. --- .../src/main/java/org/jivesoftware/smackx/mam/MamManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java index 3b90d1cb5..61fd861df 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java @@ -995,7 +995,7 @@ public final class MamManager extends Manager { public List pagePrevious(int count) throws NoResponseException, XMPPErrorException, NotConnectedException, NotLoggedInException, InterruptedException { RSMSet previousResultRsmSet = getPreviousRsmSet(); - RSMSet requestRsmSet = new RSMSet(count, previousResultRsmSet.getLast(), RSMSet.PageDirection.before); + RSMSet requestRsmSet = new RSMSet(count, previousResultRsmSet.getFirst(), RSMSet.PageDirection.before); return page(requestRsmSet); }