aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-16 14:42:36 +0200
committerKim Alvefur <zash@zash.se>2018-08-16 14:42:36 +0200
commite28b633d158fd30228e474f0c11dd03a817fc7a7 (patch)
tree3162a515faac6e7ec9ac930af3a6461e244d33b2 /plugins/mod_pubsub
parent87bd02e9171b8e0651c4897903b6b79853a9272d (diff)
downloadprosody-e28b633d158fd30228e474f0c11dd03a817fc7a7.tar.gz
prosody-e28b633d158fd30228e474f0c11dd03a817fc7a7.zip
mod_pubsub: Make notification of node deletion configurable
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index b607be99..5f6acab5 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -111,6 +111,11 @@ local node_config_form = dataform {
{ 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 @@ local config_field_map = {
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 @@ local function config_to_xep0060(node_config)
["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