Comparison

plugins/mod_pep.lua @ 9082:297a06074175

mod_pep: Return true if all node config checks passes (fixes configuration) util.pubsub would treat the default nil return as falsy and reject all attempts to configure nodes
author Kim Alvefur <zash@zash.se>
date Fri, 03 Aug 2018 20:39:18 +0200
parent 9080:1b21f8ffaec8
child 9097:ce2ba9f91c84
comparison
equal deleted inserted replaced
9081:ce57c69a20e2 9082:297a06074175
42 42
43 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node 212/actor 43 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node 212/actor
44 if (new_config["max_items"] or 1) > max_max_items then 44 if (new_config["max_items"] or 1) > max_max_items then
45 return false; 45 return false;
46 end 46 end
47 return true;
47 end 48 end
48 49
49 local function subscription_presence(username, recipient) 50 local function subscription_presence(username, recipient)
50 local user_bare = jid_join(username, host); 51 local user_bare = jid_join(username, host);
51 local recipient_bare = jid_bare(recipient); 52 local recipient_bare = jid_bare(recipient);