diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-02 13:49:42 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-02 13:49:42 +0100 |
commit | 89b37d4e0a219f6a9311f4887a46d39aaecbf84e (patch) | |
tree | 8fb5118b7a230ee79d0f6980886d42d1aae7a9f6 /plugins/mod_smacks.lua | |
parent | 9f3feb39f909922b83fc0a62aabfc5ef94fb5568 (diff) | |
download | prosody-89b37d4e0a219f6a9311f4887a46d39aaecbf84e.tar.gz prosody-89b37d4e0a219f6a9311f4887a46d39aaecbf84e.zip |
mod_smacks: Remove dead conditional
`cached_stanza` can't be falsy because util.stanza.clone() would have
thrown rather than return nil, or `._cached=true` would have.
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r-- | plugins/mod_smacks.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua index 6eaadf48..13fec24d 100644 --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -207,7 +207,7 @@ local function outgoing_stanza_filter(stanza, session) local cached_stanza = st.clone(stanza); cached_stanza._cached = true; - if cached_stanza and cached_stanza.name ~= "iq" and cached_stanza:get_child("delay", xmlns_delay) == nil then + if cached_stanza.name ~= "iq" and cached_stanza:get_child("delay", xmlns_delay) == nil then cached_stanza = cached_stanza:tag("delay", { xmlns = xmlns_delay, from = jid.bare(session.full_jid or session.host), |