diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-16 14:49:42 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-16 14:49:42 +0200 |
commit | 18f25e3b3f8832f2c2c46231ea3483b58403d8f3 (patch) | |
tree | 02d18f7e9e03d7ad6f93d44005bb6a7e7c4ae6fc /plugins | |
parent | 1e2b0d97f08ab6f7ddb52d37dcde63fdb7171fbc (diff) | |
download | prosody-18f25e3b3f8832f2c2c46231ea3483b58403d8f3.tar.gz prosody-18f25e3b3f8832f2c2c46231ea3483b58403d8f3.zip |
mod_pubsub: Add support for "quiet nodes" (disabling notifications)
Diffstat (limited to 'plugins')
-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 a7ac8787..b607be99 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -98,6 +98,11 @@ local node_config_form = dataform { }; }; { + type = "boolean"; + label = "Whether to deliver payloads with event notifications"; + name = "pubsub#deliver_payloads"; + }; + { type = "list-single"; name = "pubsub#notification_type"; label = "Specify the delivery style for notifications"; @@ -150,6 +155,7 @@ local config_field_map = { notification_type = "pubsub#notification_type"; access_model = "pubsub#access_model"; publish_model = "pubsub#publish_model"; + notify_items = "pubsub#deliver_notifications"; }; local reverse_config_field_map = {}; for k, v in pairs(config_field_map) do reverse_config_field_map[v] = k; end @@ -165,6 +171,7 @@ local function config_to_xep0060(node_config) ["pubsub#notification_type"] = node_config["notification_type"]; ["pubsub#access_model"] = node_config["access_model"]; ["pubsub#publish_model"] = node_config["publish_model"]; + ["pubsub#deliver_notifications"] = node_config["notify_items"]; } end |