mod_pubsub: Make notification of item retraction configurable
authorKim Alvefur <zash@zash.se>
Thu, 16 Aug 2018 14:44:09 +0200
changeset 9187 9fbddb80803b
parent 9186 8239f24e38df
child 9188 60f163e7a7a7
mod_pubsub: Make notification of item retraction configurable
plugins/mod_pubsub/pubsub.lib.lua
--- a/plugins/mod_pubsub/pubsub.lib.lua	Thu Aug 16 14:42:36 2018 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Thu Aug 16 14:44:09 2018 +0200
@@ -116,6 +116,11 @@
 		label = "Whether to notify subscribers when the node is deleted";
 		name = "pubsub#notify_delete";
 	};
+	{
+		type = "boolean";
+		label = "Whether to notify subscribers when items are removed from the node";
+		name = "pubsub#notify_retract";
+	};
 };
 
 local subscribe_options_form = dataform {
@@ -162,6 +167,7 @@
 	publish_model = "pubsub#publish_model";
 	notify_items = "pubsub#deliver_notifications";
 	notify_delete = "pubsub#notify_delete";
+	notify_retract = "pubsub#notify_retract";
 };
 local reverse_config_field_map = {};
 for k, v in pairs(config_field_map) do reverse_config_field_map[v] = k; end
@@ -179,6 +185,7 @@
 		["pubsub#publish_model"] = node_config["publish_model"];
 		["pubsub#deliver_notifications"] = node_config["notify_items"];
 		["pubsub#notify_delete"] = node_config["notify_delete"];
+		["pubsub#notify_retract"] = node_config["notify_retract"];
 	}
 end