aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-25 05:11:10 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-25 05:11:10 +0000
commitff6b4c2c6d8823412bfc4ee7946cd2bf449ea174 (patch)
treef0046719bbec2124f94240c3627f60f663b41f52 /plugins
parentc4742ed7810b3e10bfc6bdb55a11c31b3faf5426 (diff)
parent4e56a3c519bc0d46a3491ca18cb58c3e8dbb5ae9 (diff)
downloadprosody-vault/0.6.0.tar.gz
prosody-vault/0.6.0.zip
Merge with 0.6 on prosody.imvault/0.6.00.6.0
Diffstat (limited to 'plugins')
-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