aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-06 08:21:55 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-06 08:21:55 +0100
commit96509275b883522d8a16bed56c998a2a2fe0424f (patch)
tree8a905f8eee3e7772c11f811003d310094f78d6a2 /util/pubsub.lua
parent56b0cd35c6768193b5c237c176339f176b73f1a2 (diff)
parent27bbd90669cf314d6945892456e4ed0a20590302 (diff)
downloadprosody-96509275b883522d8a16bed56c998a2a2fe0424f.tar.gz
prosody-96509275b883522d8a16bed56c998a2a2fe0424f.zip
Merge with jonasw
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 381c449a..964b26c7 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -565,6 +565,8 @@ function service:set_node_config(node, actor, new_config)
return false, "item-not-found";
end
+ setmetatable(new_config, {__index=self.node_defaults})
+
if self.config.check_node_config then
local ok = self.config.check_node_config(node, actor, new_config);
if not ok then
@@ -573,7 +575,7 @@ function service:set_node_config(node, actor, new_config)
end
local old_config = node_obj.config;
- node_obj.config = setmetatable(new_config, {__index=self.node_defaults});
+ node_obj.config = new_config;
if self.config.nodestore then
local ok, err = save_node_to_store(self, node_obj);