aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_presence.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-11-22 21:55:58 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-11-22 21:55:58 +0500
commit4c8e3f457d16e6246f851c3f71ad0d957713d616 (patch)
treeb605c894bb243376110c5b91607dc30c7ce47b61 /plugins/mod_presence.lua
parent88f3737a7f70cfeac067fd9682a22bbd86872fff (diff)
parent889562f945cc57d19db944d6085fdfe5683dea5d (diff)
downloadprosody-4c8e3f457d16e6246f851c3f71ad0d957713d616.tar.gz
prosody-4c8e3f457d16e6246f851c3f71ad0d957713d616.zip
Merged with 0.6.
Diffstat (limited to 'plugins/mod_presence.lua')
-rw-r--r--plugins/mod_presence.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index f83e017b..cda8dab0 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -233,6 +233,7 @@ function handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_b
-- 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 @@ function handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_b
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