From 7df3613768b9d0a85ccf0589caafc2e2a632c21e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 8 Aug 2018 23:20:07 +0100 Subject: mod_pep, util.pubsub: Rename restricted->outcast, none->member and add new 'none' affiliation to better match XEP-0060 --- util/pubsub.lua | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/pubsub.lua b/util/pubsub.lua index dc7c01e5..48f9af3e 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -10,7 +10,7 @@ local default_config = { get_affiliation = function () end; normalize_jid = function (jid) return jid; end; capabilities = { - restricted = { + outcast = { be_subscribed = false; be_unsubscribed = true; }; @@ -20,6 +20,28 @@ local default_config = { retract = false; get_nodes = true; + subscribe = true; + unsubscribe = true; + get_subscription = true; + get_subscriptions = true; + get_items = false; + + subscribe_other = false; + unsubscribe_other = false; + get_subscription_other = false; + get_subscriptions_other = false; + + be_subscribed = true; + be_unsubscribed = true; + + set_affiliation = false; + }; + member = { + create = false; + publish = false; + retract = false; + get_nodes = true; + subscribe = true; unsubscribe = true; get_subscription = true; @@ -196,7 +218,7 @@ function service:get_default_affiliation(node, actor, action) -- luacheck: ignor if access_model == "open" then return "none"; elseif access_model == "whitelist" then - return "restricted"; + return "outcast"; end if self.config.access_models then -- cgit v1.2.3