plugins/mod_smacks.lua
branch0.12
changeset 12529 8087f5357f53
parent 12526 1671cb924002
child 12530 252ed01896dd
--- 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