Software /
code /
prosody
Comparison
core/stanza_router.lua @ 1142:0e02b3301e80
stanza_router: Pass session.to_host to modulemanager, fixes modules for s2sin_unauthed
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 09 May 2009 19:43:11 +0100 |
parent | 1043:ad87f555b484 |
child | 1144:fbd65e966316 |
comparison
equal
deleted
inserted
replaced
1141:9d9570516ce8 | 1142:0e02b3301e80 |
---|---|
143 | 143 |
144 -- This function handles stanzas which are not routed any further, | 144 -- This function handles stanzas which are not routed any further, |
145 -- that is, they are handled by this server | 145 -- that is, they are handled by this server |
146 function core_handle_stanza(origin, stanza) | 146 function core_handle_stanza(origin, stanza) |
147 -- Handlers | 147 -- Handlers |
148 if modules_handle_stanza(select(2, jid_split(stanza.attr.to)) or origin.host, origin, stanza) then return; end | 148 if modules_handle_stanza(select(2, jid_split(stanza.attr.to)) or origin.host or origin.to_host, origin, stanza) then return; end |
149 if origin.type == "c2s" or origin.type == "s2sin" then | 149 if origin.type == "c2s" or origin.type == "s2sin" then |
150 if origin.type == "c2s" then | 150 if origin.type == "c2s" then |
151 if stanza.name == "presence" and origin.roster then | 151 if stanza.name == "presence" and origin.roster then |
152 if stanza.attr.type == nil or stanza.attr.type == "unavailable" and stanza.attr.type ~= "error" then | 152 if stanza.attr.type == nil or stanza.attr.type == "unavailable" and stanza.attr.type ~= "error" then |
153 handle_normal_presence(origin, stanza, core_route_stanza); | 153 handle_normal_presence(origin, stanza, core_route_stanza); |