aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-09 17:21:50 +0100
committerKim Alvefur <zash@zash.se>2017-11-09 17:21:50 +0100
commit476d3cfb23e6a129f257d6e819cf2f85b8e58b50 (patch)
treea2f06f49361903e8311e24da1d27a6b6cb49c497 /plugins/mod_pubsub
parentf81f466b2831a0fa586cd9dafa3473084778bdda (diff)
downloadprosody-476d3cfb23e6a129f257d6e819cf2f85b8e58b50.tar.gz
prosody-476d3cfb23e6a129f257d6e819cf2f85b8e58b50.zip
mod_pubsub/archive_itemstore: Support resize operation
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index ae99167f..3146054e 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -490,6 +490,11 @@ local function archive_itemstore(archive, config, user, node)
function get_set:clear() -- luacheck: ignore 212/self
return archive:delete(user);
end
+ function get_set:resize(size)
+ return archive:delete(user, {
+ truncate = size;
+ });
+ end
function get_set:tail()
-- This should conveniently return the last item
local item = self:get(nil);