Changeset

8298:dd9fa511494a

mod_pubsub: Add method to clear data from a simple_itemstore
author Kim Alvefur <zash@zash.se>
date Sun, 08 Oct 2017 01:28:32 +0200
parents 8297:ac5c90230c2c
children 8299:756a2a00e7e7
files plugins/mod_pubsub/pubsub.lib.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Sun Oct 08 01:27:04 2017 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Sun Oct 08 01:28:32 2017 +0200
@@ -383,6 +383,9 @@
 		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;