Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 8504:80b8355c8b8b
mod_pubsub: Add nodestore to service configuration
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 02 Feb 2018 19:46:33 +0000 |
parent | 8503:3b86134c56ea |
child | 8505:c9bdb4dfed96 |
line wrap: on
line diff
--- 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;