Backed out changeset 27d800ddc3b0 (see below)
It's uncertain whether item not existing should be success and
nil, or fail with an error.
XEP-0060's "fetch most recent item" actually fetches a list of up
to N items. N here is a maximum, not a minimum. The feeling is that
no items is simply an empty list, not a failure of the operation.
--- a/util/pubsub.lua Sat Aug 18 14:21:02 2018 +0100
+++ b/util/pubsub.lua Sat Aug 18 14:30:14 2018 +0100
@@ -598,8 +598,8 @@
end
--
- -- Check node exists and has an item published
- if not (self.nodes[node] and self.data[node]) then
+ -- Check node exists
+ if not self.nodes[node] then
return false, "item-not-found";
end