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.
--- 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":";