# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1517600793 0
# Node ID 80b8355c8b8b8b0afe68e1d50f4087da8f23d550
# Parent  3b86134c56ea4319ac2ca72b28fe6fa1ee4627ff
mod_pubsub: Add nodestore to service configuration

diff -r 3b86134c56ea -r 80b8355c8b8b plugins/mod_pubsub/mod_pubsub.lua
--- a/plugins/mod_pubsub/mod_pubsub.lua	Fri Feb 02 19:35:02 2018 +0000
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Fri Feb 02 19:46:33 2018 +0000
@@ -26,6 +26,8 @@
 	return lib_pubsub.handle_pubsub_iq(event, service);
 end
 
+local node_store = module:open_store(module.name.."_nodes");
+
 local function create_simple_itemstore(node_config, node_name)
 	local archive = module:open_store("pubsub_"..node_name, "archive");
 	return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name);
@@ -202,6 +204,7 @@
 		autocreate_on_publish = autocreate_on_publish;
 		autocreate_on_subscribe = autocreate_on_subscribe;
 
+		nodestore = node_store;
 		itemstore = create_simple_itemstore;
 		broadcaster = simple_broadcast;
 		get_affiliation = get_affiliation;