Comparison

core/stanza_router.lua @ 4918:98a8db95de8c

stanza_router: Don't bounce type=error stanzas
author Kim Alvefur <zash@zash.se>
date Sun, 27 May 2012 04:01:34 +0200
parent 4877:6f5b53cb3565
child 4919:6cbc35cdefaf
comparison
equal deleted inserted replaced
4917:d1dca1d12d53 4918:98a8db95de8c
197 local xmlns = stanza.attr.xmlns; 197 local xmlns = stanza.attr.xmlns;
198 stanza.attr.xmlns = nil; 198 stanza.attr.xmlns = nil;
199 local routed = host_session.events.fire_event("route/remote", { origin = origin, stanza = stanza, from_host = from_host, to_host = host }); 199 local routed = host_session.events.fire_event("route/remote", { origin = origin, stanza = stanza, from_host = from_host, to_host = host });
200 stanza.attr.xmlns = xmlns; -- reset 200 stanza.attr.xmlns = xmlns; -- reset
201 if not routed then 201 if not routed then
202 log("debug", "... no, just kidding.");
203 if stanza.attr.type == "error" then return end
202 core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled")); 204 core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled"));
203 end 205 end
204 end 206 end
205 end 207 end
206 end 208 end