Software /
code /
prosody
Diff
plugins/mod_presence.lua @ 2168:1a99a3bf3ce6 0.6.0
Merge with 0.6 on prosody.im
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 25 Nov 2009 05:11:10 +0000 |
parent | 2143:13ac68e8760b |
child | 2228:3987078bb179 |
line wrap: on
line diff
--- a/plugins/mod_presence.lua Wed Nov 25 03:30:00 2009 +0000 +++ b/plugins/mod_presence.lua Wed Nov 25 05:11:10 2009 +0000 @@ -233,6 +233,7 @@ -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too) end else + core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt if not rostermanager.is_contact_pending_in(node, host, from_bare) then if rostermanager.set_contact_pending_in(node, host, from_bare) then sessionmanager.send_to_available_resources(node, host, stanza); @@ -241,14 +242,17 @@ end elseif stanza.attr.type == "unsubscribe" then if rostermanager.process_inbound_unsubscribe(node, host, from_bare) then + sessionmanager.send_to_interested_resources(node, host, stanza); rostermanager.roster_push(node, host, from_bare); end elseif stanza.attr.type == "subscribed" then if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then + sessionmanager.send_to_interested_resources(node, host, stanza); rostermanager.roster_push(node, host, from_bare); end elseif stanza.attr.type == "unsubscribed" then if rostermanager.process_inbound_subscription_cancellation(node, host, from_bare) then + sessionmanager.send_to_interested_resources(node, host, stanza); rostermanager.roster_push(node, host, from_bare); end end -- discard any other type