From 1245e980da35efdaee4a2ae9ab30435a7dd78e6e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 8 Oct 2017 01:28:32 +0200 Subject: mod_pubsub: Add method to clear data from a simple_itemstore --- plugins/mod_pubsub/pubsub.lib.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/mod_pubsub/pubsub.lib.lua') diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index e33fe836..5e09dab3 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -383,6 +383,9 @@ local function simple_itemstore(archive, config, user, node, expose_publisher) end return data; end + function get_set:clear() + return archive:delete(user, { with = node }); + end return setmetatable(get_set, archive); end _M.simple_itemstore = simple_itemstore; -- cgit v1.2.3