diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-08-08 23:20:07 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-08-08 23:20:07 +0100 |
commit | 7df3613768b9d0a85ccf0589caafc2e2a632c21e (patch) | |
tree | 77c141846138013e742b4afdc2d6631a64a1b420 | |
parent | 674da5cef01d41d923718d721d7a665008bf12e9 (diff) | |
download | prosody-7df3613768b9d0a85ccf0589caafc2e2a632c21e.tar.gz prosody-7df3613768b9d0a85ccf0589caafc2e2a632c21e.zip |
mod_pep, util.pubsub: Rename restricted->outcast, none->member and add new 'none' affiliation to better match XEP-0060
-rw-r--r-- | plugins/mod_pep.lua | 7 | ||||
-rw-r--r-- | util/pubsub.lua | 26 |
2 files changed, 26 insertions, 7 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index e43b67b1..4239ce66 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -171,12 +171,9 @@ function get_pep_service(username) access_models = { presence = function (jid) if subscription_presence(username, jid) then - -- This is their affiliation level which determines - -- permissions, it is acceptable to be a subscriber - -- with no affiliation. - return "none"; + return "member"; end - return "restricted"; + return "outcast"; end; }; 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; }; @@ -24,6 +24,28 @@ local default_config = { 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; + get_subscriptions = true; get_items = true; subscribe_other = false; @@ -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 |