plugins/mod_pubsub/pubsub.lib.lua
changeset 9186 8239f24e38df
parent 9185 ec48c02ded0c
child 9187 9fbddb80803b
--- a/plugins/mod_pubsub/pubsub.lib.lua	Thu Aug 16 14:49:42 2018 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Thu Aug 16 14:42:36 2018 +0200
@@ -111,6 +111,11 @@
 			{ label = "Messages of type headline", value = "headline", default = true },
 		};
 	};
+	{
+		type = "boolean";
+		label = "Whether to notify subscribers when the node is deleted";
+		name = "pubsub#notify_delete";
+	};
 };
 
 local subscribe_options_form = dataform {
@@ -156,6 +161,7 @@
 	access_model = "pubsub#access_model";
 	publish_model = "pubsub#publish_model";
 	notify_items = "pubsub#deliver_notifications";
+	notify_delete = "pubsub#notify_delete";
 };
 local reverse_config_field_map = {};
 for k, v in pairs(config_field_map) do reverse_config_field_map[v] = k; end
@@ -172,6 +178,7 @@
 		["pubsub#access_model"] = node_config["access_model"];
 		["pubsub#publish_model"] = node_config["publish_model"];
 		["pubsub#deliver_notifications"] = node_config["notify_items"];
+		["pubsub#notify_delete"] = node_config["notify_delete"];
 	}
 end