# HG changeset patch # User Kim Alvefur # Date 1638449382 -3600 # Node ID 27f2539b4f871f53068fdf591147a8730a172417 # Parent c7c0c40487e25a6d4ee7997388eb7fa9e0ca136c 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. diff -r c7c0c40487e2 -r 27f2539b4f87 plugins/mod_smacks.lua --- a/plugins/mod_smacks.lua Thu Dec 02 03:03:44 2021 +0100 +++ b/plugins/mod_smacks.lua Thu Dec 02 13:49:42 2021 +0100 @@ -207,7 +207,7 @@ 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),