diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-26 12:09:58 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-26 12:09:58 +0200 |
commit | 4112d0cb3f8c1d74afb8332bcb07748a693811e3 (patch) | |
tree | 703466d8e1092c6fed347639d6c96b1e896f692c | |
parent | a7a4931456a617422c547daeec2a9e9c5fb82f83 (diff) | |
download | prosody-4112d0cb3f8c1d74afb8332bcb07748a693811e3.tar.gz prosody-4112d0cb3f8c1d74afb8332bcb07748a693811e3.zip |
mod_pubsub: Pass 'user' to simple_itemstore
-rw-r--r-- | plugins/mod_pep_plus.lua | 8 | ||||
-rw-r--r-- | plugins/mod_pubsub/mod_pubsub.lua | 2 | ||||
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua index 49def4e3..7872c03f 100644 --- a/plugins/mod_pep_plus.lua +++ b/plugins/mod_pep_plus.lua @@ -36,8 +36,10 @@ local function subscription_presence(user_bare, recipient) 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 @@ function get_pep_service(name) 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 --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua index 8bbebcf9..649ba89d 100644 --- a/plugins/mod_pubsub/mod_pubsub.lua +++ b/plugins/mod_pubsub/mod_pubsub.lua @@ -39,7 +39,7 @@ function handle_pubsub_iq(event) 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 --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 810f608a..d298d6ac 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -326,7 +326,7 @@ local function create_encapsulating_item(id, payload, publisher, expose_publishe 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() |