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 | a1c779a3eb5f7031fe01738087d03f3fe8ae44e2 (patch) | |
tree | a21ea35414a2815009a972eef900be112d8819db | |
parent | 2282b01839e2b2bf1c92bef7424d6582ecb994c9 (diff) | |
download | prosody-a1c779a3eb5f7031fe01738087d03f3fe8ae44e2.tar.gz prosody-a1c779a3eb5f7031fe01738087d03f3fe8ae44e2.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.
-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 |