Software /
code /
prosody-modules
Changeset
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 |
parents | 2892:bf9fc41bf7ad |
children | 2894:165d2877eeac |
files | mod_s2s_blacklist/mod_s2s_blacklist.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
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);