Changeset

12073:4cbe7979a92a

mod_smacks: Fix traceback when bouncing unacked stanzas Errors sent from handle_unacked_stanzas() should usually not be sent to the session itself, but if one is, it should not be queued.
author Kim Alvefur <zash@zash.se>
date Sat, 18 Dec 2021 13:58:33 +0100
parents 12072:ef0f174488af
children 12074:b892f5489d79
files plugins/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Sat Dec 18 13:48:57 2021 +0100
+++ b/plugins/mod_smacks.lua	Sat Dec 18 13:58:33 2021 +0100
@@ -150,6 +150,7 @@
 	-- 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.
 	if session.resending_unacked then return stanza end
+	if not session.smacks then return stanza end
 	local is_stanza = st.is_stanza(stanza) and
 		(not stanza.attr.xmlns or stanza.attr.xmlns == 'jabber:client')
 		and not stanza.name:find":";