Software /
code /
prosody
Diff
plugins/mod_pubsub/pubsub.lib.lua @ 10090:cdcf26331b9f
mod_pubsub: Eliminate dead code
`data` is a stanza and always truthy
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 25 Jul 2019 12:26:07 +0200 |
parent | 10062:6ffed67356e9 |
child | 10276:4e4ce7400b39 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua Fri Jul 26 21:21:48 2019 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Thu Jul 25 12:26:07 2019 +0200 @@ -328,14 +328,9 @@ 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