mod_s2s_blacklist/mod_s2s_blacklist.lua
changeset 2897 d958558e0058
parent 1325 b21236b6b8d8
--- 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);