plugins/mod_presence.lua

changeset 2142
4b339020607f
parent 2038
4ab83f96585a
child 2143
13ac68e8760b
equal deleted inserted replaced
2141:f544729f9228 2142:4b339020607f
231 -- Sending presence is not clearly stated in the RFC, but it seems appropriate 231 -- Sending presence is not clearly stated in the RFC, but it seems appropriate
232 if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then 232 if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then
233 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too) 233 -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
234 end 234 end
235 else 235 else
236 core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt
236 if not rostermanager.is_contact_pending_in(node, host, from_bare) then 237 if not rostermanager.is_contact_pending_in(node, host, from_bare) then
237 if rostermanager.set_contact_pending_in(node, host, from_bare) then 238 if rostermanager.set_contact_pending_in(node, host, from_bare) then
238 sessionmanager.send_to_available_resources(node, host, stanza); 239 sessionmanager.send_to_available_resources(node, host, stanza);
239 end -- TODO else return error, unable to save 240 end -- TODO else return error, unable to save
240 end 241 end

mercurial