From c900502c9c5ece766638f0fc7a9df05c878ed11c 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(+) 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