# HG changeset patch # User Kim Alvefur # Date 1689972534 -7200 # Node ID e0ab20519ce545ecc949cd26f9919644e6ddd9b6 # Parent 6a11d92ae436646d0beecb96098f60341a8cfdfd plugins: Use get_option_array for some list shaped options Passing something from module:get_option() to ipairs() suggests that the option is a list of some sort. diff -r 6a11d92ae436 -r e0ab20519ce5 plugins/mod_authz_internal.lua --- a/plugins/mod_authz_internal.lua Fri Jul 21 18:03:22 2023 +0200 +++ b/plugins/mod_authz_internal.lua Fri Jul 21 22:48:54 2023 +0200 @@ -90,7 +90,7 @@ -- Process custom roles from config -local custom_roles = module:get_option("custom_roles", {}); +local custom_roles = module:get_option_array("custom_roles", {}); for n, role_config in ipairs(custom_roles) do local ok, err = pcall(register_role, role_config); if not ok then diff -r 6a11d92ae436 -r e0ab20519ce5 plugins/mod_register_ibr.lua --- a/plugins/mod_register_ibr.lua Fri Jul 21 18:03:22 2023 +0200 +++ b/plugins/mod_register_ibr.lua Fri Jul 21 22:48:54 2023 +0200 @@ -16,7 +16,7 @@ local nodeprep = require "prosody.util.encodings".stringprep.nodeprep; local util_error = require "prosody.util.error"; -local additional_fields = module:get_option("additional_registration_fields", {}); +local additional_fields = module:get_option_array("additional_registration_fields", {}); local require_encryption = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", true));