Diff

plugins/mod_pep_plus.lua @ 8300:7759eb130938

mod_pep_plus, mod_pubsub: Store node content in separate archive stores
author Kim Alvefur <zash@zash.se>
date Sun, 08 Oct 2017 01:56:44 +0200
parent 8218:2c75a5ba58fc
child 8303:053cf683c2c7
line wrap: on
line diff
--- a/plugins/mod_pep_plus.lua	Sun Oct 08 18:34:57 2017 +0200
+++ b/plugins/mod_pep_plus.lua	Sun Oct 08 01:56:44 2017 +0200
@@ -19,8 +19,6 @@
 local recipients = {};
 local hash_map = {};
 
-local archive = module:open_store("pubsub", "archive");
-
 function module.save()
 	return { services = services };
 end
@@ -38,6 +36,8 @@
 
 local function simple_itemstore(user)
 	return function (config, node)
+		module:log("debug", "new simple_itemstore(%q, %q)", user, node);
+		local archive = module:open_store("pep_"..node, "archive");
 		return lib_pubsub.simple_itemstore(archive, config, user, node, false);
 	end
 end
@@ -62,6 +62,7 @@
 end
 
 function get_pep_service(name)
+	module:log("debug", "get_pep_service(%q)");
 	local service = services[name];
 	if service then
 		return service;