aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-18 21:21:43 +0200
committerKim Alvefur <zash@zash.se>2017-10-18 21:21:43 +0200
commitfc7955077e8843945dc1ecf2d9e26a28241e91a8 (patch)
tree509785e1b10017287a7196a6b8274cc436f8191e
parent4d367d534969d3e0070b4e9f85d4810dbfdfe25a (diff)
downloadprosody-fc7955077e8843945dc1ecf2d9e26a28241e91a8.tar.gz
prosody-fc7955077e8843945dc1ecf2d9e26a28241e91a8.zip
util.pubsub: Return an empty list if specific item asked for does not exist (thanks jonasw)
-rw-r--r--util/pubsub.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 9397484a..575153b8 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -338,7 +338,7 @@ function service:get_items(node, actor, id)
if id then -- Restrict results to a single specific item
local with_id = self.data[node]:get(id);
if not with_id then
- return false, "item-not-found";
+ return true, { };
end
return true, { id, [id] = with_id };
else