# HG changeset patch # User Kim Alvefur # Date 1550817344 -3600 # Node ID fd8aaab6669c075e35035feef9fb0e6e3b024b75 # Parent 13c2707d2417137ddbb8351e216849b0c0ee21ab mod_pep: Simplify configuration for node data (fixes #1320) diff -r 13c2707d2417 -r fd8aaab6669c plugins/mod_pep.lua --- a/plugins/mod_pep.lua Sat Feb 09 19:28:24 2019 +0100 +++ b/plugins/mod_pep.lua Fri Feb 22 07:35:44 2019 +0100 @@ -8,6 +8,7 @@ local is_contact_subscribed = require "core.rostermanager".is_contact_subscribed; local cache = require "util.cache"; local set = require "util.set"; +local storagemanager = require "core.storagemanager"; local xmlns_pubsub = "http://jabber.org/protocol/pubsub"; local xmlns_pubsub_event = "http://jabber.org/protocol/pubsub#event"; @@ -113,10 +114,11 @@ end local function simple_itemstore(username) + local driver = storagemanager.get_driver(module.host, "pep_data"); return function (config, node) if config["persist_items"] then module:log("debug", "Creating new persistent item store for user %s, node %q", username, node); - local archive = module:open_store("pep_"..node, "archive"); + local archive = driver:open("pep_"..node, "archive"); return lib_pubsub.archive_itemstore(archive, config, username, node, false); else module:log("debug", "Creating new ephemeral item store for user %s, node %q", username, node);