Diff

util/pubsub.lua @ 9106:e70b9e8bc443

util.pubsub: Use service.node_defaults in case config.node_defaults was not provided (thanks jonasw)
author Matthew Wild <mwild1@gmail.com>
date Sat, 04 Aug 2018 21:30:10 +0100
parent 9104:e1ca373a7e09
child 9107:6e42ef9c805c
line wrap: on
line diff
--- a/util/pubsub.lua	Sat Aug 04 15:44:38 2018 +0200
+++ b/util/pubsub.lua	Sat Aug 04 21:30:10 2018 +0100
@@ -114,7 +114,7 @@
 function service:get_default_affiliation(node, actor, action) -- luacheck: ignore 212
 	local node_obj = self.nodes[node];
 	local access_model = node_obj and node_obj.config.access_model
-		or self.config.node_defaults.access_model;
+		or self.node_defaults.access_model;
 
 	if access_model == "open" then
 		return "none";