From 89b37d4e0a219f6a9311f4887a46d39aaecbf84e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 2 Dec 2021 13:49:42 +0100 Subject: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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), -- cgit v1.2.3