Diff

util/pubsub.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 8326:12408867bc86
child 8343:5df2f240173b
line wrap: on
line diff
--- a/util/pubsub.lua	Tue Oct 17 05:30:09 2017 +0200
+++ b/util/pubsub.lua	Tue Oct 17 05:47:06 2017 +0200
@@ -5,13 +5,14 @@
 local service_mt = { __index = service };
 
 local default_config = { __index = {
-	itemstore = function (config, _) return cache.new(tonumber(config["pubsub#max_items"])) end;
+	itemstore = function (config, _) return cache.new(config["max_items"]) end;
 	broadcaster = function () end;
 	get_affiliation = function () end;
 	capabilities = {};
 } };
 local default_node_config = { __index = {
-	["pubsub#max_items"] = "20";
+	["persist_items"] = false;
+	["max_items"] = 20;
 } };
 
 local function new(config)