aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_smacks.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-27 12:05:47 +0200
committerKim Alvefur <zash@zash.se>2022-05-27 12:05:47 +0200
commit568aa794417fc145a5174767b22195592f1a7fd1 (patch)
tree98bffa02cd2fa2858845dcad5fe405ebdc93f0ea /plugins/mod_smacks.lua
parent8027b67f19bd54eb0d7847a77bf8d642f1d95f16 (diff)
downloadprosody-568aa794417fc145a5174767b22195592f1a7fd1.tar.gz
prosody-568aa794417fc145a5174767b22195592f1a7fd1.zip
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
Diffstat (limited to 'plugins/mod_smacks.lua')
-rw-r--r--plugins/mod_smacks.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua
index 33c90ee9..3573d74a 100644
--- a/plugins/mod_smacks.lua
+++ b/plugins/mod_smacks.lua
@@ -418,7 +418,7 @@ local function handle_unacked_stanzas(session)
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