aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
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