From ff03ef384f75de6531479a49a7e6fc34199a4ac9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 6 Aug 2018 08:39:46 +0100 Subject: pubsub.lib: Add comment about tonumber hack --- plugins/mod_pubsub/pubsub.lib.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/mod_pubsub') diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua index 0119da14..03a2e390 100644 --- a/plugins/mod_pubsub/pubsub.lib.lua +++ b/plugins/mod_pubsub/pubsub.lib.lua @@ -152,6 +152,9 @@ local function config_from_xep0060(config, strict) for config_field, config_value in pairs(config) do local mapped_name = reverse_config_field_map[config_field]; if mapped_name then + -- FIXME: The intention is to add "subtype" support to + -- util.dataforms, which will remove the need for this + -- ugly hack if mapped_name == "max_items" then config_value = tonumber(config_value); end -- cgit v1.2.3