# HG changeset patch # User Kim Alvefur # Date 1510244510 -3600 # Node ID 07443fe9df5bc21859644ffbd0de5217d6c2fa99 # Parent 3eff1b60269a53f3b7abb843b417e2319601272f mod_pubsub/archive_itemstore: Support resize operation diff -r 3eff1b60269a -r 07443fe9df5b plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Sat Nov 18 21:35:40 2017 +0100 +++ b/plugins/mod_pubsub/pubsub.lib.lua Thu Nov 09 17:21:50 2017 +0100 @@ -490,6 +490,11 @@ 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);