--- a/util/pubsub.lua Sat Mar 02 22:26:01 2019 +0100
+++ b/util/pubsub.lua Sun Mar 03 19:31:56 2019 +0100
@@ -436,10 +436,19 @@
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 = {};
};