diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-16 14:44:09 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-16 14:44:09 +0200 |
commit | 997025dc398e4b740966297dd812f5ca185dea67 (patch) | |
tree | f4f409724630001e990970d246b64c8110decd4f | |
parent | fe1c3488eb47534be75f29c199096ac313b963a4 (diff) | |
download | prosody-997025dc398e4b740966297dd812f5ca185dea67.tar.gz prosody-997025dc398e4b740966297dd812f5ca185dea67.zip |
mod_pubsub: Make notification of item retraction configurable
-rw-r--r-- | plugins/mod_pubsub/pubsub.lib.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 5f6acab5..99b6ba63 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -116,6 +116,11 @@ local node_config_form = dataform { 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 @@ local config_field_map = { 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 @@ local function config_to_xep0060(node_config) ["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 |