Comparison

core/stanza_router.lua @ 173:f3a2af4d2ff2

Inbound unsubscribe
author Waqas Hussain <waqas20@gmail.com>
date Sat, 25 Oct 2008 02:38:24 +0500
parent 172:71247788c7c7
child 174:f9aff1fc7e99
comparison
equal deleted inserted replaced
172:71247788c7c7 173:f3a2af4d2ff2
207 send(origin, st.presence({from=to_bare, to=from_bare, type="unsubscribed"})); 207 send(origin, st.presence({from=to_bare, to=from_bare, type="unsubscribed"}));
208 end 208 end
209 elseif stanza.attr.type == "subscribe" then 209 elseif stanza.attr.type == "subscribe" then
210 -- TODO 210 -- TODO
211 elseif stanza.attr.type == "unsubscribe" then 211 elseif stanza.attr.type == "unsubscribe" then
212 -- TODO 212 if rostermanager.process_inbound_unsubscribe(node, host, from_bare) then
213 rostermanager.roster_push(node, host, from_bare);
214 end
213 elseif stanza.attr.type == "subscribed" then 215 elseif stanza.attr.type == "subscribed" then
214 if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then 216 if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then
215 rostermanager.roster_push(node, host, from_bare); 217 rostermanager.roster_push(node, host, from_bare);
216 for k in pairs(user.sessions) do -- return presence for all resources 218 for k in pairs(user.sessions) do -- return presence for all resources
217 local pres = user.sessions[k].presence; 219 local pres = user.sessions[k].presence;