aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-02 13:49:42 +0100
committerKim Alvefur <zash@zash.se>2021-12-02 13:49:42 +0100
commit89b37d4e0a219f6a9311f4887a46d39aaecbf84e (patch)
tree8fb5118b7a230ee79d0f6980886d42d1aae7a9f6 /plugins
parent9f3feb39f909922b83fc0a62aabfc5ef94fb5568 (diff)
downloadprosody-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')
-rw-r--r--plugins/mod_smacks.lua2
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),