configs/trunk: Use new array append feature to simplify

This commit is contained in:
Kim Alvefur
2025-02-15 15:32:06 +01:00
parent 8ed20cbe8f
commit 46201eefc1
+5 -10
View File
@@ -98,12 +98,12 @@ local default_modules = {
--"welcome"; -- Welcome users who register accounts --"welcome"; -- Welcome users who register accounts
} }
for _, module_name in ipairs(_split(ENV_PROSODY_ENABLE_MODULES) or {}) do if ENV_PROSODY_ENABLE_MODULES then
default_modules[#default_modules+1] = module_name; modules_enabled:append(_split(ENV_PROSODY_ENABLE_MODULES))
end end
if ENV_PROSODY_TURN_SECRET then if ENV_PROSODY_TURN_SECRET then
default_modules[#default_modules+1] = "turn_external"; modules_enabled:append{ "turn_external" };
turn_external_secret = ENV_PROSODY_TURN_SECRET turn_external_secret = ENV_PROSODY_TURN_SECRET
turn_external_host = ENV_PROSODY_TURN_HOST turn_external_host = ENV_PROSODY_TURN_HOST
turn_external_port = ENV_PROSODY_TURN_PORT turn_external_port = ENV_PROSODY_TURN_PORT
@@ -111,17 +111,12 @@ if ENV_PROSODY_TURN_SECRET then
end end
if ENV_PROSODY_RETENTION_DAYS or ENV_PROSODY_ARCHIVE_EXPIRY_DAYS then if ENV_PROSODY_RETENTION_DAYS or ENV_PROSODY_ARCHIVE_EXPIRY_DAYS then
default_modules[#default_modules+1] = "mam"; modules_enabled:append{ "mam" }
end end
modules_enabled = default_modules modules_enabled = default_modules
local env_disabled_modules = {}; modules_disabled = _split(ENV_PROSODY_DISABLE_MODULES)
for _, module_name in ipairs(_split(ENV_PROSODY_DISABLE_MODULES) or {}) do
env_disabled_modules[#env_disabled_modules+1] = module_name;
end
modules_disabled = env_disabled_modules
-- Server-to-server authentication -- Server-to-server authentication