# HG changeset patch # User Kim Alvefur # Date 1507506320 -7200 # Node ID df8c82d285dc7c84240f4510ca581ea03eb8e187 # Parent 1759491b53db2874df60d970493fa194e0f5c853 mod_pubsub: Restore persistence with one archive per node diff -r 1759491b53db -r df8c82d285dc plugins/mod_pubsub/mod_pubsub.lua --- a/plugins/mod_pubsub/mod_pubsub.lua Mon Oct 09 01:02:17 2017 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Mon Oct 09 01:45:20 2017 +0200 @@ -21,10 +21,6 @@ module:add_identity("pubsub", "service", pubsub_disco_name); module:add_feature("http://jabber.org/protocol/pubsub"); ---[[ TODO Disabled until config persistence is implemented -local archive = module:open_store("pubsub", "archive"); ---]] - function handle_pubsub_iq(event) local origin, stanza = event.origin, event.stanza; local pubsub_tag = stanza.tags[1]; @@ -40,11 +36,10 @@ end end ---[[ TODO Disabled until config persistence is implemented local function simple_itemstore(config, node) + local archive = module:open_store("pubsub_"..node, "archive"); return lib_pubsub.simple_itemstore(archive, config, nil, node, expose_publisher); end ---]] function simple_broadcast(kind, node, jids, item, actor) if item then @@ -234,9 +229,7 @@ autocreate_on_publish = autocreate_on_publish; autocreate_on_subscribe = autocreate_on_subscribe; - --[[ TODO Disabled until config persistence is implemented itemstore = simple_itemstore; - --]] broadcaster = simple_broadcast; get_affiliation = get_affiliation;