aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-01-29 18:16:39 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-01-29 18:16:39 +0500
commitd77c415e7641d865bcea11d87b68d1c75cbc81f3 (patch)
tree97c3e398787e93aa724a7c470cdb266632719f1f
parent06ffadf829c80908d9056d51417468da8eb5bce1 (diff)
downloadprosody-d77c415e7641d865bcea11d87b68d1c75cbc81f3.tar.gz
prosody-d77c415e7641d865bcea11d87b68d1c75cbc81f3.zip
mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.
-rw-r--r--plugins/mod_presence.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 815b5c8b..31d2d7b4 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -217,7 +217,7 @@ function handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_b
if stanza.attr.type == "probe" then
if rostermanager.is_contact_subscribed(node, host, from_bare) then
if 0 == send_presence_of_available_resources(node, host, st_from, origin, core_route_stanza) then
- -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
+ core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- TODO send last activity
end
else
core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unsubscribed"}));
@@ -227,7 +227,7 @@ function handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_b
core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="subscribed"})); -- already subscribed
-- Sending presence is not clearly stated in the RFC, but it seems appropriate
if 0 == send_presence_of_available_resources(node, host, from_bare, origin, core_route_stanza) then
- -- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
+ core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- TODO send last activity
end
else
core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt