stanza_router: Fix handling of iq from c2s to bare JIDs, thanks to jaharkes for spotting

Wed, 11 Feb 2009 19:53:09 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 11 Feb 2009 19:53:09 +0000
changeset 789
ced87939984e
parent 788
b85b1dee4f4b
child 790
f42ad7385640

stanza_router: Fix handling of iq from c2s to bare JIDs, thanks to jaharkes for spotting

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Wed Feb 11 19:52:05 2009 +0000
+++ b/core/stanza_router.lua	Wed Feb 11 19:53:09 2009 +0000
@@ -126,7 +126,7 @@
 			component_handle_stanza(origin, stanza);
 		elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then
 			handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);
-		elseif origin.type ~= "c2s" and stanza.name == "iq" and not resource then -- directed at bare JID
+		elseif hosts[host] and hosts[host].type == "local" and stanza.name == "iq" and not resource then -- directed at bare JID
 			core_handle_stanza(origin, stanza);
 		else
 			core_route_stanza(origin, stanza);

mercurial