# HG changeset patch # User Kim Alvefur # Date 1493201398 -7200 # Node ID 2c75a5ba58fc74e4a58f02f3bcd061b73e794260 # Parent 5f4e0d67b82ae03b721d5d2f06d9d5ea50082641 mod_pubsub: Pass 'user' to simple_itemstore diff -r 5f4e0d67b82a -r 2c75a5ba58fc plugins/mod_pep_plus.lua --- a/plugins/mod_pep_plus.lua Wed Apr 26 12:06:41 2017 +0200 +++ b/plugins/mod_pep_plus.lua Wed Apr 26 12:09:58 2017 +0200 @@ -36,8 +36,10 @@ return is_contact_subscribed(username, host, recipient_bare); end -local function simple_itemstore(config, node) - return lib_pubsub.simple_itemstore(archive, config, node, false); +local function simple_itemstore(user) + return function (config, node) + return lib_pubsub.simple_itemstore(archive, config, user, node, false); + end end local function get_broadcaster(name) @@ -166,7 +168,7 @@ autocreate_on_publish = true; autocreate_on_subscribe = true; - itemstore = simple_itemstore; + itemstore = simple_itemstore(name); broadcaster = get_broadcaster(name); get_affiliation = function (jid) if jid_bare(jid) == name then diff -r 5f4e0d67b82a -r 2c75a5ba58fc plugins/mod_pubsub/mod_pubsub.lua --- a/plugins/mod_pubsub/mod_pubsub.lua Wed Apr 26 12:06:41 2017 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Wed Apr 26 12:09:58 2017 +0200 @@ -39,7 +39,7 @@ end local function simple_itemstore(config, node) - return lib_pubsub.simple_itemstore(archive, config, node, expose_publisher); + return lib_pubsub.simple_itemstore(archive, config, nil, node, expose_publisher); end function simple_broadcast(kind, node, jids, item, actor) diff -r 5f4e0d67b82a -r 2c75a5ba58fc plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Wed Apr 26 12:06:41 2017 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Wed Apr 26 12:09:58 2017 +0200 @@ -326,7 +326,7 @@ return item; end -local function simple_itemstore(archive, config, node, expose_publisher) +local function simple_itemstore(archive, config, user, node, expose_publisher) module:log("debug", "Creation of itemstore for node %s with config %s", node, config); local get_set = {}; function get_set:items()