Software /
code /
prosody
Comparison
core/stanza_router.lua @ 72:e78db62beebc
Code cleanup
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 08 Oct 2008 17:05:25 +0500 |
parent | 71:fbb4ef1da82e |
child | 73:937448005121 |
comparison
equal
deleted
inserted
replaced
71:fbb4ef1da82e | 72:e78db62beebc |
---|---|
53 local host_session = hosts[host] | 53 local host_session = hosts[host] |
54 if host_session and host_session.type == "local" then | 54 if host_session and host_session.type == "local" then |
55 -- Local host | 55 -- Local host |
56 local user = host_session.sessions[node]; | 56 local user = host_session.sessions[node]; |
57 if user then | 57 if user then |
58 local res = nil; | 58 local res = user.sessions[resource]; |
59 if resource then | |
60 res = user.sessions[resource]; | |
61 end | |
62 -- TODO do something about presence broadcast | 59 -- TODO do something about presence broadcast |
63 if not res then | 60 if not res then |
64 -- if we get here, resource was not specified or was unavailable | 61 -- if we get here, resource was not specified or was unavailable |
65 for k in pairs(user.sessions) do | 62 for k in pairs(user.sessions) do |
66 res = user.sessions[k]; | 63 res = user.sessions[k]; |