Software /
code /
prosody-modules
Diff
mod_s2s_blacklist/mod_s2s_blacklist.lua @ 2893:d958558e0058
mod_s2s_blacklist: Don't send error replies for error stanzas
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 24 Feb 2018 19:38:10 +0100 |
parent | 1325:b21236b6b8d8 |
line wrap: on
line diff
--- a/mod_s2s_blacklist/mod_s2s_blacklist.lua Fri Feb 23 22:00:18 2018 +0100 +++ b/mod_s2s_blacklist/mod_s2s_blacklist.lua Sat Feb 24 19:38:10 2018 +0100 @@ -4,7 +4,9 @@ module:hook("route/remote", function (event) if blacklist:contains(event.to_host) then - module:send(st.error_reply(event.stanza, "cancel", "not-allowed", "Communication with this domain is restricted")); + if event.stanza.attr.type ~= "error" then + module:send(st.error_reply(event.stanza, "cancel", "not-allowed", "Communication with this domain is restricted")); + end return true; end end, 100);