# HG changeset patch # User Matthew Wild # Date 1534599014 -3600 # Node ID c65bfddd3cc500d682d8db746eebc83f2386e128 # Parent 27d800ddc3b0d42b413288d45fb01f99b5205212 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. diff -r 27d800ddc3b0 -r c65bfddd3cc5 util/pubsub.lua --- 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