aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-10-25 02:29:58 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-10-25 02:29:58 +0500
commit6c822abf42a548865e7907f1f02c8e3344580b4d (patch)
tree5ecf7684106d6e1c3451d33bafe11e8b2e19149e /core/stanza_router.lua
parent17d7c83a7141e6d2142c9dece0845051c85ef592 (diff)
downloadprosody-6c822abf42a548865e7907f1f02c8e3344580b4d.tar.gz
prosody-6c822abf42a548865e7907f1f02c8e3344580b4d.zip
Inbound subscription cancellation
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index da7433c7..3126bb75 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -211,7 +211,6 @@ function core_route_stanza(origin, stanza)
elseif stanza.attr.type == "unsubscribe" then
-- TODO
elseif stanza.attr.type == "subscribed" then
- -- TODO
if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then
rostermanager.roster_push(node, host, from_bare);
for k in pairs(user.sessions) do -- return presence for all resources
@@ -226,7 +225,9 @@ function core_route_stanza(origin, stanza)
pres.attr.from = nil;
end
elseif stanza.attr.type == "unsubscribed" then
- -- TODO
+ if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then
+ rostermanager.roster_push(node, host, from_bare);
+ end
end -- discard any other type
else -- sender is available or unavailable
for k in pairs(user.sessions) do -- presence broadcast to all user resources