Software / code / prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 11187:76e135fbca0f
mod_pubsub: Clarify kind of item store created
Planning to make this configurable, so good to distinguish it from
future backends.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 25 Oct 2020 15:21:34 +0100 |
| parent | 11186:15fe9f0bb483 |
| child | 11429:ef623d719894 |
comparison
equal
deleted
inserted
replaced
| 11186:15fe9f0bb483 | 11187:76e135fbca0f |
|---|---|
| 794 item:add_child(payload); | 794 item:add_child(payload); |
| 795 return item; | 795 return item; |
| 796 end | 796 end |
| 797 | 797 |
| 798 local function archive_itemstore(archive, config, user, node) | 798 local function archive_itemstore(archive, config, user, node) |
| 799 module:log("debug", "Creation of itemstore for node %s with config %s", node, config); | 799 module:log("debug", "Creation of archive itemstore for node %s with config %q", node, config); |
| 800 local get_set = {}; | 800 local get_set = {}; |
| 801 local max_items = config["max_items"]; | 801 local max_items = config["max_items"]; |
| 802 function get_set:items() -- luacheck: ignore 212/self | 802 function get_set:items() -- luacheck: ignore 212/self |
| 803 local data, err = archive:find(user, { | 803 local data, err = archive:find(user, { |
| 804 limit = tonumber(max_items); | 804 limit = tonumber(max_items); |