Diff

util/pubsub.lua @ 9160:e13a1a0b0107

mod_pep, util.pubsub: Rename restricted->outcast, none->member and add new 'none' affiliation to better match XEP-0060
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Aug 2018 23:20:07 +0100
parent 9158:37e814a680ab
child 9161:da154ced7de4
line wrap: on
line diff
--- a/util/pubsub.lua	Wed Aug 08 21:49:41 2018 +0200
+++ b/util/pubsub.lua	Wed Aug 08 23:20:07 2018 +0100
@@ -10,7 +10,7 @@
 	get_affiliation = function () end;
 	normalize_jid = function (jid) return jid; end;
 	capabilities = {
-		restricted = {
+		outcast = {
 			be_subscribed = false;
 			be_unsubscribed = true;
 		};
@@ -24,6 +24,28 @@
 			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 @@
 	if access_model == "open" then
 		return "none";
 	elseif access_model == "whitelist" then
-		return "restricted";
+		return "outcast";
 	end
 
 	if self.config.access_models then