diff options
author | Kim Alvefur <zash@zash.se> | 2019-02-22 07:33:23 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-02-22 07:33:23 +0100 |
commit | 845d6eb9a7c1120c29064ef577ee89eca15bd2b6 (patch) | |
tree | e633f7d44d5c36d114df9b6f2758c2e960b1187b | |
parent | 9d51a572f8b38b96bd297d9da1513482cad26f07 (diff) | |
download | prosody-845d6eb9a7c1120c29064ef577ee89eca15bd2b6.tar.gz prosody-845d6eb9a7c1120c29064ef577ee89eca15bd2b6.zip |
mod_pubsub: Simplify configuration for node data (see #1302)
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index 40adcafe..855c5fd2 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 |