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
commit1245e980da35efdaee4a2ae9ab30435a7dd78e6e (patch)
tree0186324224643559c3974e7419fd3a2d0bda9428 /plugins/mod_pubsub/pubsub.lib.lua
parent2d6ea5d99d8da18bd3132f50625ca9b889a9c489 (diff)
downloadprosody-1245e980da35efdaee4a2ae9ab30435a7dd78e6e.tar.gz
prosody-1245e980da35efdaee4a2ae9ab30435a7dd78e6e.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;