Comparison

plugins/mod_smacks.lua @ 12525:8087f5357f53 0.12

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
author Kim Alvefur <zash@zash.se>
date Fri, 27 May 2022 12:05:47 +0200
parent 12522:1671cb924002
child 12526:252ed01896dd
comparison
equal deleted inserted replaced
12522:1671cb924002 12525:8087f5357f53
416 tx_dropped_stanzas:sample(unacked); 416 tx_dropped_stanzas:sample(unacked);
417 session.smacks = false; -- Disable queueing 417 session.smacks = false; -- Disable queueing
418 session.outgoing_stanza_queue = nil; 418 session.outgoing_stanza_queue = nil;
419 for stanza in queue._queue:consume() do 419 for stanza in queue._queue:consume() do
420 if not module:fire_event("delivery/failure", { session = session, stanza = stanza }) then 420 if not module:fire_event("delivery/failure", { session = session, stanza = stanza }) then
421 if stanza.attr.type ~= "error" and stanza.attr.to ~= session.full_jid then 421 if stanza.attr.type ~= "error" and stanza.attr.from ~= session.full_jid then
422 local reply = st.error_reply(stanza, "cancel", "recipient-unavailable"); 422 local reply = st.error_reply(stanza, "cancel", "recipient-unavailable");
423 core_process_stanza(session, reply); 423 core_process_stanza(session, reply);
424 end 424 end
425 end 425 end
426 end 426 end