Software /
code /
prosody
Diff
core/stanza_router.lua @ 68:ceb7a55676a4
Beginnings of real stanza routing
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 19:48:25 +0100 |
parent | 66:018705d57f09 |
child | 71:fbb4ef1da82e |
line wrap: on
line diff
--- a/core/stanza_router.lua Sun Oct 05 19:16:32 2008 +0100 +++ b/core/stanza_router.lua Sun Oct 05 19:48:25 2008 +0100 @@ -41,7 +41,21 @@ function core_route_stanza(origin, stanza) -- Hooks + --- ...later + -- Deliver + local node, host, resource = jid_split(stanza.attr.to); + local host_session = hosts[host] + if host_session and host_session.type == "local" then + -- Local host + else + -- Remote host + if host_session then + -- Send to session + else + -- Need to establish the connection + end + end end function handle_stanza_nodest(stanza)