mod_pep: Clarify purpose of fallback service
authorKim Alvefur <zash@zash.se>
Thu, 03 Feb 2022 10:02:26 +0100
changeset 12253 5173f8a761a0
parent 12252 4dbca0858f0b
child 12254 e157e5c79daa
mod_pep: Clarify purpose of fallback service Extra-extra obvious that no interaction with this should lead to persisted changes
plugins/mod_pep.lua
--- a/plugins/mod_pep.lua	Thu Feb 03 09:46:19 2022 +0100
+++ b/plugins/mod_pep.lua	Thu Feb 03 10:02:26 2022 +0100
@@ -192,6 +192,8 @@
 	end
 end
 
+-- Read-only service with no nodes where nobody is allowed anything to act as a
+-- fallback for interactions with non-existant users
 local nobody_service = pubsub.new({
 	node_defaults = {
 		["max_items"] = 1;
@@ -199,6 +201,11 @@
 		["access_model"] = "presence";
 		["send_last_published_item"] = "on_sub_and_presence";
 	};
+	autocreate_on_publish = false;
+	autocreate_on_subscribe = false;
+	get_affiliation = function ()
+		return "outcast";
+	end;
 });
 
 function get_pep_service(username)