plugins/mod_pubsub/pubsub.lib.lua
changeset 8402 07443fe9df5b
parent 8378 e2037634cdd9
child 8403 518b56d806bd
--- 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);