Changeset

11979:705c4c07a860

mod_smacks: Use stanza type checking function for correctness Non-stanza tables with an 'attr' field might be rare in Prosody, but better to be Correct
author Kim Alvefur <zash@zash.se>
date Wed, 01 Dec 2021 21:04:32 +0100
parents 11978:628374809421
children 11980:a91494a4c3d0
files plugins/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Wed Dec 01 16:26:53 2021 +0100
+++ b/plugins/mod_smacks.lua	Wed Dec 01 21:04:32 2021 +0100
@@ -196,7 +196,7 @@
 	-- supposed to be nil.
 	-- However, when using mod_smacks with mod_websocket, then mod_websocket's
 	-- stanzas/out filter can get called before this one and adds the xmlns.
-	local is_stanza = stanza.attr and
+	local is_stanza = st.is_stanza(stanza) and
 		(not stanza.attr.xmlns or stanza.attr.xmlns == 'jabber:client')
 		and not stanza.name:find":";