Diff

plugins/mod_pep_plus.lua @ 8333:2abbb01cd756

pubsub: Distinguish internal representation of node config from XEP-0060 form (util.pubsub should be protocol-agnostic)
author Kim Alvefur <zash@zash.se>
date Tue, 17 Oct 2017 05:47:06 +0200
parent 8332:e89b57d0d80a
child 8335:9db72349095f
line wrap: on
line diff
--- a/plugins/mod_pep_plus.lua	Tue Oct 17 05:30:09 2017 +0200
+++ b/plugins/mod_pep_plus.lua	Tue Oct 17 05:47:06 2017 +0200
@@ -43,7 +43,7 @@
 
 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 @@
 		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 @@
 		};
 
 		node_defaults = {
-			["pubsub#max_items"] = "1";
-			["pubsub#persist_items"] = true;
+			["max_items"] = 1;
+			["persist_items"] = true;
 		};
 
 		autocreate_on_publish = true;