comparison plugins/mod_pep.lua @ 12249:5173f8a761a0

mod_pep: Clarify purpose of fallback service Extra-extra obvious that no interaction with this should lead to persisted changes
author Kim Alvefur <zash@zash.se>
date Thu, 03 Feb 2022 10:02:26 +0100
parents 4dbca0858f0b
children e729c994e7c7
comparison
equal deleted inserted replaced
12248:4dbca0858f0b 12249:5173f8a761a0
190 end 190 end
191 return broadcast_to; 191 return broadcast_to;
192 end 192 end
193 end 193 end
194 194
195 -- Read-only service with no nodes where nobody is allowed anything to act as a
196 -- fallback for interactions with non-existant users
195 local nobody_service = pubsub.new({ 197 local nobody_service = pubsub.new({
196 node_defaults = { 198 node_defaults = {
197 ["max_items"] = 1; 199 ["max_items"] = 1;
198 ["persist_items"] = false; 200 ["persist_items"] = false;
199 ["access_model"] = "presence"; 201 ["access_model"] = "presence";
200 ["send_last_published_item"] = "on_sub_and_presence"; 202 ["send_last_published_item"] = "on_sub_and_presence";
201 }; 203 };
204 autocreate_on_publish = false;
205 autocreate_on_subscribe = false;
206 get_affiliation = function ()
207 return "outcast";
208 end;
202 }); 209 });
203 210
204 function get_pep_service(username) 211 function get_pep_service(username)
205 local user_bare = jid_join(username, host); 212 local user_bare = jid_join(username, host);
206 local service = services[username]; 213 local service = services[username];