powered by Jive Software

Using function getItems() in LeafNode.java always only get one item after upgrading openfire

Using function getItems() in LeafNode.java always only get one item after upgrading openfire
I wonder if this is a regression issue and found this code change: OF-1141 Pubsub leaf nodes variant · igniterealtime/Openfire@82ae779 · GitHub

the value of maxPublishedItems changed from -1 to 1

And function getPublishedItems(PubSubService service, IQ iq, Element itemsElement) in PubSubEngine.java

else {
List requestedItems = itemsElement.elements(“item”);
if (requestedItems.isEmpty()) {
// Get all the active items that were published to the node
items = new ArrayList<>(leafNode.getPublishedItems());
}

LeafNode.java
@Override
public List getPublishedItems() {
return getPublishedItems(getMaxPublishedItems()); // only get one item from DB as the default value of maxItems is 1
}