diff options
author | Kim Alvefur <zash@zash.se> | 2019-03-04 13:46:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-03-04 13:46:09 +0100 |
commit | 2326bed3c7b2386aa1706ad0e760827ef2e165ce (patch) | |
tree | e47cbfb67c4f98b179baec19c2f4fd66e62f7132 /util | |
parent | 9c9d32e7e69af9aa59c1937b91bc41525d584144 (diff) | |
parent | 09a662026a3fc4c69eda9d8ef8862abac5569625 (diff) | |
download | prosody-2326bed3c7b2386aa1706ad0e760827ef2e165ce.tar.gz prosody-2326bed3c7b2386aa1706ad0e760827ef2e165ce.zip |
Merge 0.11->trunk
Diffstat (limited to 'util')
-rw-r--r-- | util/pubsub.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index a53e8b95..e5e0cb7c 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -436,10 +436,19 @@ function service:create(node, actor, options) --> ok, err return false, "conflict"; end + local config = setmetatable(options or {}, {__index=self.node_defaults}); + + if self.config.check_node_config then + local ok = self.config.check_node_config(node, actor, config); + if not ok then + return false, "not-acceptable"; + end + end + self.nodes[node] = { name = node; subscribers = {}; - config = setmetatable(options or {}, {__index=self.node_defaults}); + config = config; affiliations = {}; }; |