mod_smacks: Remove dead conditional
authorKim Alvefur <zash@zash.se>
Thu, 02 Dec 2021 13:49:42 +0100
changeset 11987 27f2539b4f87
parent 11986 c7c0c40487e2
child 11988 a86ae74da96c
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.
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),