Software /
code /
prosody
Changeset
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 |
parents | 10089:90e459f48cbd |
children | 10091:bd547587f48c |
files | plugins/mod_pubsub/pubsub.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
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