hostmanager: Don't prevent host_session.send() from routing errors or iq results, so modules can handle them. This code was originally added for a reason, but I can't remember what it was.
authorMatthew Wild <mwild1@gmail.com>
Fri, 26 Sep 2014 17:10:43 +0100
changeset 6433 ceaf2a0d05eb
parent 6432 675aea867574
child 6434 540f4e33394a
hostmanager: Don't prevent host_session.send() from routing errors or iq results, so modules can handle them. This code was originally added for a reason, but I can't remember what it was.
core/hostmanager.lua
--- a/core/hostmanager.lua	Thu Sep 25 17:43:00 2014 -0400
+++ b/core/hostmanager.lua	Fri Sep 26 17:10:43 2014 +0100
@@ -56,13 +56,6 @@
 prosody_events.add_handler("server-starting", load_enabled_hosts);
 
 local function host_send(stanza)
-	local name, type = stanza.name, stanza.attr.type;
-	if type == "error" or (name == "iq" and type == "result") then
-		local dest_host_name = select(2, jid_split(stanza.attr.to));
-		local dest_host = hosts[dest_host_name] or { type = "unknown" };
-		log("warn", "Unhandled response sent to %s host %s: %s", dest_host.type, dest_host_name, tostring(stanza));
-		return;
-	end
 	core_route_stanza(nil, stanza);
 end