aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-02-22 07:40:30 +0100
committerKim Alvefur <zash@zash.se>2019-02-22 07:40:30 +0100
commit87d797878eafa659d1b009bb470ab88b44ff95a2 (patch)
treef826fcf5e10c199772391d40fdf347f6d3d36e17 /plugins
parenteb245f3dd6fb501214fabe1536a64bb76cef9c48 (diff)
parent845d6eb9a7c1120c29064ef577ee89eca15bd2b6 (diff)
downloadprosody-87d797878eafa659d1b009bb470ab88b44ff95a2.tar.gz
prosody-87d797878eafa659d1b009bb470ab88b44ff95a2.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pep.lua4
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua4
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 5e3f43f2..92a09bb0 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -9,6 +9,7 @@ local is_contact_subscribed = require "core.rostermanager".is_contact_subscribed
local cache = require "util.cache";
local set = require "util.set";
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";
@@ -114,10 +115,11 @@ local function nodestore(username)
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);
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index 0036b48f..05f80365 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -3,6 +3,7 @@ local st = require "util.stanza";
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 @@ 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");
+ 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