Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 9725:8ad689b6d26f
mod_pubsub: Split line in config check to improve readability
Also makes it easier to compare with mod_pep
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 23 Dec 2018 03:06:35 +0100 |
parent | 9724:8e6a0e1c1876 |
child | 9829:fdc42f685557 |
comparison
equal
deleted
inserted
replaced
9724:8e6a0e1c1876 | 9725:8ad689b6d26f |
---|---|
101 local max_max_items = module:get_option_number("pubsub_max_items", 256); | 101 local max_max_items = module:get_option_number("pubsub_max_items", 256); |
102 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node 212/actor | 102 function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node 212/actor |
103 if (new_config["max_items"] or 1) > max_max_items then | 103 if (new_config["max_items"] or 1) > max_max_items then |
104 return false; | 104 return false; |
105 end | 105 end |
106 if new_config["access_model"] ~= "whitelist" and new_config["access_model"] ~= "open" then | 106 if new_config["access_model"] ~= "whitelist" |
107 and new_config["access_model"] ~= "open" then | |
107 return false; | 108 return false; |
108 end | 109 end |
109 return true; | 110 return true; |
110 end | 111 end |
111 | 112 |