aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-11-22 21:47:54 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-11-22 21:47:54 +0500
commit889562f945cc57d19db944d6085fdfe5683dea5d (patch)
treefa3f57abb1f13625f3a19e5ebc8a9b83dcc928f2
parentmod_presence: Acknowledge subscription requests by responding with an unavailable presence. (diff)
downloadprosody-889562f945cc57d19db944d6085fdfe5683dea5d.tar.xz
prosody-889562f945cc57d19db944d6085fdfe5683dea5d.zip
mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.
-rw-r--r--plugins/mod_presence.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 468049cc0..cda8dab0d 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -242,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