stanza_router: Pass session.to_host to modulemanager, fixes modules for s2sin_unauthed

Sat, 09 May 2009 19:43:11 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 09 May 2009 19:43:11 +0100
changeset 1142
0e02b3301e80
parent 1141
9d9570516ce8
child 1144
fbd65e966316

stanza_router: Pass session.to_host to modulemanager, fixes modules for s2sin_unauthed

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Fri May 08 04:41:18 2009 +0500
+++ b/core/stanza_router.lua	Sat May 09 19:43:11 2009 +0100
@@ -145,7 +145,7 @@
 -- that is, they are handled by this server
 function core_handle_stanza(origin, stanza)
 	-- Handlers
-	if modules_handle_stanza(select(2, jid_split(stanza.attr.to)) or origin.host, origin, stanza) then return; end
+	if modules_handle_stanza(select(2, jid_split(stanza.attr.to)) or origin.host or origin.to_host, origin, stanza) then return; end
 	if origin.type == "c2s" or origin.type == "s2sin" then
 		if origin.type == "c2s" then
 			if stanza.name == "presence" and origin.roster then

mercurial