Comparison

plugins/mod_presence.lua @ 2229:3b38ec879076

mod_presence: Use the local host as origin for subscription request acks.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 26 Nov 2009 13:02:10 +0500
parent 2228:3987078bb179
child 2259:22417227d2ce
comparison
equal deleted inserted replaced
2228:3987078bb179 2229:3b38ec879076
228 -- Sending presence is not clearly stated in the RFC, but it seems appropriate 228 -- Sending presence is not clearly stated in the RFC, but it seems appropriate
229 if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then 229 if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then
230 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too) 230 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
231 end 231 end
232 else 232 else
233 core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt 233 core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt
234 if not rostermanager.is_contact_pending_in(node, host, from_bare) then 234 if not rostermanager.is_contact_pending_in(node, host, from_bare) then
235 if rostermanager.set_contact_pending_in(node, host, from_bare) then 235 if rostermanager.set_contact_pending_in(node, host, from_bare) then
236 sessionmanager.send_to_available_resources(node, host, stanza); 236 sessionmanager.send_to_available_resources(node, host, stanza);
237 end -- TODO else return error, unable to save 237 end -- TODO else return error, unable to save
238 end 238 end