Software /
code /
prosody
Comparison
util/pubsub.lua @ 9125:da7a2db01d6a
Merge with jonasw
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 06 Aug 2018 08:21:55 +0100 |
parent | 9117:a19fdc6e4f09 |
child | 9129:7721794e9e93 |
comparison
equal
deleted
inserted
replaced
9124:dcc490f0044d | 9125:da7a2db01d6a |
---|---|
563 local node_obj = self.nodes[node]; | 563 local node_obj = self.nodes[node]; |
564 if not node_obj then | 564 if not node_obj then |
565 return false, "item-not-found"; | 565 return false, "item-not-found"; |
566 end | 566 end |
567 | 567 |
568 setmetatable(new_config, {__index=self.node_defaults}) | |
569 | |
568 if self.config.check_node_config then | 570 if self.config.check_node_config then |
569 local ok = self.config.check_node_config(node, actor, new_config); | 571 local ok = self.config.check_node_config(node, actor, new_config); |
570 if not ok then | 572 if not ok then |
571 return false, "not-acceptable"; | 573 return false, "not-acceptable"; |
572 end | 574 end |
573 end | 575 end |
574 | 576 |
575 local old_config = node_obj.config; | 577 local old_config = node_obj.config; |
576 node_obj.config = setmetatable(new_config, {__index=self.node_defaults}); | 578 node_obj.config = new_config; |
577 | 579 |
578 if self.config.nodestore then | 580 if self.config.nodestore then |
579 local ok, err = save_node_to_store(self, node_obj); | 581 local ok, err = save_node_to_store(self, node_obj); |
580 if not ok then | 582 if not ok then |
581 node_obj.config = old_config; | 583 node_obj.config = old_config; |