Software /
code /
prosody
Changeset
11983:27f2539b4f87
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 02 Dec 2021 13:49:42 +0100 |
parents | 11982:c7c0c40487e2 |
children | 11984:a86ae74da96c |
files | plugins/mod_smacks.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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),