Software /
code /
prosody
Comparison
core/stanza_router.lua @ 781:191b9f0e5485
Fixed: Some presence stanzas from local users were not being routed correctly to components (ghosts in mod_muc)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 11 Feb 2009 18:11:41 +0500 |
parent | 780:4417ab6ccc20 |
child | 783:defb0119f80f |
comparison
equal
deleted
inserted
replaced
780:4417ab6ccc20 | 781:191b9f0e5485 |
---|---|
176 | 176 |
177 -- Auto-detect origin if not specified | 177 -- Auto-detect origin if not specified |
178 origin = origin or hosts[from_host]; | 178 origin = origin or hosts[from_host]; |
179 if not origin then return false; end | 179 if not origin then return false; end |
180 | 180 |
181 if hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource | |
182 return component_handle_stanza(origin, stanza); | |
183 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server | |
184 return component_handle_stanza(origin, stanza); | |
185 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component | |
186 return component_handle_stanza(origin, stanza); | |
187 end | |
188 | |
181 if stanza.name == "presence" and (stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable") then resource = nil; end | 189 if stanza.name == "presence" and (stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable") then resource = nil; end |
182 | 190 |
183 local host_session = hosts[host] | 191 local host_session = hosts[host] |
184 if host_session and host_session.type == "local" then | 192 if host_session and host_session.type == "local" then |
185 -- Local host | 193 -- Local host |