# HG changeset patch # User Kim Alvefur # Date 1653645947 -7200 # Node ID 8087f5357f5341bea35f89702548ae6afb67c8c5 # Parent 1671cb924002625a26b9d8d82dee80646ab51403 mod_smacks: Fix bounce of stanzas directed to full JID on unclean disconnect Fixes #1758 Introduced in 1ea01660c79a In e62025f949f9 to and from was inverted since it changed from acting on a reply to acting on the original stanza (or a clone thereof) Unsure of the purpose of this check, you don't usually send stanzas to your own full JID. Perhaps guarding against routing loops? The check was present in the original commit of mod_smacks, prosody-modules rev 9a7671720dec diff -r 1671cb924002 -r 8087f5357f53 plugins/mod_smacks.lua --- a/plugins/mod_smacks.lua Thu May 26 17:38:55 2022 +0200 +++ b/plugins/mod_smacks.lua Fri May 27 12:05:47 2022 +0200 @@ -418,7 +418,7 @@ session.outgoing_stanza_queue = nil; for stanza in queue._queue:consume() do if not module:fire_event("delivery/failure", { session = session, stanza = stanza }) then - if stanza.attr.type ~= "error" and stanza.attr.to ~= session.full_jid then + if stanza.attr.type ~= "error" and stanza.attr.from ~= session.full_jid then local reply = st.error_reply(stanza, "cancel", "recipient-unavailable"); core_process_stanza(session, reply); end