From a8c6de6b98387ece45cf442e34ae7140f6007240 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 10 Mar 2017 12:07:21 +0100 Subject: [PATCH] Improve MamManager javadoc --- .../jivesoftware/smackx/mam/MamManager.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 07a45977b..1a07554a4 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 @@ -411,9 +411,12 @@ public final class MamManager extends Manager { /** * Obtain page before the first message saved (specific chat). + *

+ * Note that the messageUid is the XEP-0313 UID and not the stanza ID of the message. + *

* * @param chatJid - * @param firstMessageId + * @param messageUid the UID of the message of which messages before should be received. * @param max * @return the MAM query result * @throws XMPPErrorException @@ -422,9 +425,9 @@ public final class MamManager extends Manager { * @throws InterruptedException * @throws NoResponseException */ - public MamQueryResult pageBefore(Jid chatJid, String firstMessageId, int max) throws XMPPErrorException, + public MamQueryResult pageBefore(Jid chatJid, String messageUid, int max) throws XMPPErrorException, NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException { - RSMSet rsmSet = new RSMSet(null, firstMessageId, -1, -1, null, max, null, -1); + RSMSet rsmSet = new RSMSet(null, messageUid, -1, -1, null, max, null, -1); DataForm dataForm = getNewMamForm(); addWithJid(chatJid, dataForm); return page(null, dataForm, rsmSet); @@ -432,9 +435,12 @@ public final class MamManager extends Manager { /** * Obtain page after the last message saved (specific chat). + *

+ * Note that the messageUid is the XEP-0313 UID and not the stanza ID of the message. + *

* * @param chatJid - * @param lastMessageId + * @param messageUid the UID of the message of which messages after should be received. * @param max * @return the MAM query result * @throws XMPPErrorException @@ -443,9 +449,9 @@ public final class MamManager extends Manager { * @throws InterruptedException * @throws NoResponseException */ - public MamQueryResult pageAfter(Jid chatJid, String lastMessageId, int max) throws XMPPErrorException, + public MamQueryResult pageAfter(Jid chatJid, String messageUid, int max) throws XMPPErrorException, NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException { - RSMSet rsmSet = new RSMSet(lastMessageId, null, -1, -1, null, max, null, -1); + RSMSet rsmSet = new RSMSet(messageUid, null, -1, -1, null, max, null, -1); DataForm dataForm = getNewMamForm(); addWithJid(chatJid, dataForm); return page(null, dataForm, rsmSet);