aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub/pubsub.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-10-08 01:28:32 +0200
committerKim Alvefur <zash@zash.se>2017-10-08 01:28:32 +0200
commitc900502c9c5ece766638f0fc7a9df05c878ed11c (patch)
tree0186324224643559c3974e7419fd3a2d0bda9428 /plugins/mod_pubsub/pubsub.lib.lua
parentf8505ab244e435680779369378080a65ede3718b (diff)
downloadprosody-c900502c9c5ece766638f0fc7a9df05c878ed11c.tar.gz
prosody-c900502c9c5ece766638f0fc7a9df05c878ed11c.zip
mod_pubsub: Add method to clear data from a simple_itemstore
Diffstat (limited to 'plugins/mod_pubsub/pubsub.lib.lua')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua3
1 files changed, 3 insertions, 0 deletions
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;