diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-08-18 14:30:14 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-08-18 14:30:14 +0100 |
commit | 6e48cd5ece06914f4d55c17fbf936eb49acf8562 (patch) | |
tree | a21ea35414a2815009a972eef900be112d8819db /util | |
parent | 6ff958994e268f1a1ba5b263ae4eabbbc1b4daeb (diff) | |
download | prosody-6e48cd5ece06914f4d55c17fbf936eb49acf8562.tar.gz prosody-6e48cd5ece06914f4d55c17fbf936eb49acf8562.zip |
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.
Diffstat (limited to 'util')
-rw-r--r-- | util/pubsub.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index ca6dca20..72f7f5a7 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -598,8 +598,8 @@ function service:get_last_item(node, actor) 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 |