stanza_router: Don't bounce type=error stanzas
authorKim Alvefur <zash@zash.se>
Sun, 27 May 2012 02:01:34 +0000 (04:01 +0200)
committerKim Alvefur <zash@zash.se>
Sun, 27 May 2012 02:01:34 +0000 (04:01 +0200)
core/stanza_router.lua

index 6e8ac6b38f08e78ba5f28a9551a8eba964dd7075..043eb45862221d9bb8e9bf11276d620a3f5aa14e 100644 (file)
@@ -199,6 +199,8 @@ function core_route_stanza(origin, stanza)
                        local routed = host_session.events.fire_event("route/remote", { origin = origin, stanza = stanza, from_host = from_host, to_host = host });
                        stanza.attr.xmlns = xmlns; -- reset
                        if not routed then
+                               log("debug", "... no, just kidding.");
+                               if stanza.attr.type == "error" then return end
                                core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled"));
                        end
                end