Changeset

9828:8e68136cde08 0.11

mod_pubsub: Simplify configuration for node data (see #1302)
author Kim Alvefur <zash@zash.se>
date Fri, 22 Feb 2019 07:33:23 +0100
parents 9827:fd8aaab6669c
children 9829:fdc42f685557 9832:96d9c121547b
files plugins/mod_pubsub/mod_pubsub.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Fri Feb 22 07:35:44 2019 +0100
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Fri Feb 22 07:33:23 2019 +0100
@@ -3,6 +3,7 @@
 local jid_bare = require "util.jid".bare;
 local usermanager = require "core.usermanager";
 local new_id = require "util.id".medium;
+local storagemanager = require "core.storagemanager";
 
 local xmlns_pubsub = "http://jabber.org/protocol/pubsub";
 local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event";
@@ -42,7 +43,8 @@
 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");
+	local driver = storagemanager.get_driver(module.host, "pubsub_data");
+	local archive = driver:open("pubsub_"..node_name, "archive");
 	return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name);
 end