From 7ea43e66072912ef6cbec097985d715ef462c900 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 6 Aug 2018 11:23:42 +0100 Subject: pubsub.lib: Add support for pubsub#publish_model --- plugins/mod_pubsub/pubsub.lib.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 566450ee..a7b469d5 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -84,6 +84,16 @@ local node_config_form = dataform { { value = "whitelist" }; }; }; + { + type = "list-single"; + name = "pubsub#publish_model"; + label = "Specify the publisher model"; + options = { + { value = "publishers" }; + { value = "subscribers" }; + { value = "open" }; + }; + }; { type = "list-single"; name = "pubsub#notification_type"; @@ -131,6 +141,7 @@ local config_field_map = { persist_items = "pubsub#persist_items"; notification_type = "pubsub#notification_type"; access_model = "pubsub#access_model"; + publish_model = "pubsub#publish_model"; }; local reverse_config_field_map = {}; for k, v in pairs(config_field_map) do reverse_config_field_map[v] = k; end @@ -144,6 +155,7 @@ local function config_to_xep0060(node_config) ["pubsub#persist_items"] = node_config["persist_items"]; ["pubsub#notification_type"] = node_config["notification_type"]; ["pubsub#access_model"] = node_config["access_model"]; + ["pubsub#publish_model"] = node_config["publish_model"]; } end -- cgit v1.2.3