# HG changeset patch # User Kim Alvefur # Date 1534423782 -7200 # Node ID ec48c02ded0cb85c4c4d9e3f5ef492f269028afa # Parent 79cf1f74738fa7aaac4ef859ced1b46855a18646 mod_pubsub: Add support for "quiet nodes" (disabling notifications) diff -r 79cf1f74738f -r ec48c02ded0c plugins/mod_pubsub/pubsub.lib.lua --- a/plugins/mod_pubsub/pubsub.lib.lua Thu Aug 16 14:47:30 2018 +0200 +++ b/plugins/mod_pubsub/pubsub.lib.lua Thu Aug 16 14:49:42 2018 +0200 @@ -98,6 +98,11 @@ }; }; { + 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 @@ 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 @@ ["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