Software /
code /
prosody
Comparison
plugins/mod_smacks.lua @ 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 |
parent | 12072:ef0f174488af |
child | 12074:b892f5489d79 |
comparison
equal
deleted
inserted
replaced
12072:ef0f174488af | 12073:4cbe7979a92a |
---|---|
148 -- XXX: Normally you wouldn't have to check the xmlns for a stanza as it's | 148 -- XXX: Normally you wouldn't have to check the xmlns for a stanza as it's |
149 -- supposed to be nil. | 149 -- supposed to be nil. |
150 -- However, when using mod_smacks with mod_websocket, then mod_websocket's | 150 -- However, when using mod_smacks with mod_websocket, then mod_websocket's |
151 -- stanzas/out filter can get called before this one and adds the xmlns. | 151 -- stanzas/out filter can get called before this one and adds the xmlns. |
152 if session.resending_unacked then return stanza end | 152 if session.resending_unacked then return stanza end |
153 if not session.smacks then return stanza end | |
153 local is_stanza = st.is_stanza(stanza) and | 154 local is_stanza = st.is_stanza(stanza) and |
154 (not stanza.attr.xmlns or stanza.attr.xmlns == 'jabber:client') | 155 (not stanza.attr.xmlns or stanza.attr.xmlns == 'jabber:client') |
155 and not stanza.name:find":"; | 156 and not stanza.name:find":"; |
156 | 157 |
157 if is_stanza then | 158 if is_stanza then |