diff options
author | Kim Alvefur <zash@zash.se> | 2022-05-27 14:54:32 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-05-27 14:54:32 +0200 |
commit | 553620127a0a5edc437d8a1c970ca0cb13ab98ec (patch) | |
tree | a78fa5289aec0c1f8974df65138296823d7cd90e /plugins | |
parent | efb3513dba135107bc32859c9b073f155d56e6a0 (diff) | |
download | prosody-553620127a0a5edc437d8a1c970ca0cb13ab98ec.tar.gz prosody-553620127a0a5edc437d8a1c970ca0cb13ab98ec.zip |
mod_smacks: Indicate that bounces are generated by the server
Could arguably be implied by 'recipient-unavailable' since if it was
available, this error wouldn't happen.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_smacks.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_smacks.lua b/plugins/mod_smacks.lua index 79f824f6..3baf30c2 100644 --- a/plugins/mod_smacks.lua +++ b/plugins/mod_smacks.lua @@ -420,13 +420,14 @@ local function handle_unacked_stanzas(session) local queue = session.outgoing_stanza_queue; local unacked = queue:count_unacked() if unacked > 0 then + local error_from = jid.join(session.username, session.host or module.host); tx_dropped_stanzas:sample(unacked); session.smacks = false; -- Disable queueing 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.from ~= session.full_jid then - local reply = st.error_reply(stanza, "cancel", "recipient-unavailable"); + local reply = st.error_reply(stanza, "cancel", "recipient-unavailable", nil, error_from); module:send(reply); end end |