From 54944ff8077fcbbbf2e2ca10810def39c93fdc59 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 17 Oct 2017 05:47:06 +0200 Subject: pubsub: Distinguish internal representation of node config from XEP-0060 form (util.pubsub should be protocol-agnostic) --- plugins/mod_pep_plus.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/mod_pep_plus.lua') diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua index 00d9ea3f..53efe53e 100644 --- a/plugins/mod_pep_plus.lua +++ b/plugins/mod_pep_plus.lua @@ -43,7 +43,7 @@ end local function simple_itemstore(username) return function (config, node) - if config["pubsub#persist_items"] then + if config["persist_items"] then module:log("debug", "Creating new persistent item store for user %s, node %q", username, node); known_nodes_map:set(username, node, true); local archive = module:open_store("pep_"..node, "archive"); @@ -51,7 +51,7 @@ local function simple_itemstore(username) else module:log("debug", "Creating new ephemeral item store for user %s, node %q", username, node); known_nodes_map:set(username, node, nil); - return cache.new(tonumber(config["pubsub#max_items"])); + return cache.new(tonumber(config["max_items"])); end end end @@ -179,8 +179,8 @@ function get_pep_service(username) }; node_defaults = { - ["pubsub#max_items"] = "1"; - ["pubsub#persist_items"] = true; + ["max_items"] = 1; + ["persist_items"] = true; }; autocreate_on_publish = true; -- cgit v1.2.3