Commit 5beaf97c authored by ishmakov's avatar ishmakov

Last page request of collection XEP-0059

For more information:
https://community.igniterealtime.org/thread/56173
parent 86358e29
......@@ -61,7 +61,10 @@ public class IQRetrieveHandler extends AbstractIQHandler {
fromIndex = resultSet.getAfter().intValue() + 1;
toIndex = fromIndex + max;
} else if (resultSet.getBefore() != null) {
toIndex = resultSet.getBefore().intValue();
if (resultSet.getBefore()!=Long.MAX_VALUE)
toIndex = resultSet.getBefore().intValue();
else
toIndex = conversation.getMessages().size();
fromIndex = toIndex - max;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment