aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-07-25 12:26:07 +0200
committerKim Alvefur <zash@zash.se>2019-07-25 12:26:07 +0200
commit5652bd1b40edb6a20eb85c0b7ab809ed59aab395 (patch)
tree203c745793ef7790f5283b8f058593e592531dba /plugins/mod_pubsub
parentf30175295c5d0d843faeed59d99c3a9d67462504 (diff)
downloadprosody-5652bd1b40edb6a20eb85c0b7ab809ed59aab395.tar.gz
prosody-5652bd1b40edb6a20eb85c0b7ab809ed59aab395.zip
mod_pubsub: Eliminate dead code
`data` is a stanza and always truthy
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 83c81bb7..d59e3d85 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -328,14 +328,9 @@ function handlers.get_items(origin, stanza, items, service)
for _, id in ipairs(results) do
data:add_child(results[id]);
end
- local reply;
- if data then
- reply = st.reply(stanza)
- :tag("pubsub", { xmlns = xmlns_pubsub })
- :add_child(data);
- else
- reply = pubsub_error_reply(stanza, "item-not-found");
- end
+ local reply = st.reply(stanza)
+ :tag("pubsub", { xmlns = xmlns_pubsub })
+ :add_child(data);
origin.send(reply);
return true;
end