aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-21 22:38:30 +0200
committerKim Alvefur <zash@zash.se>2021-06-21 22:38:30 +0200
commitf53ff863f09b78d7cadd6e59cbdb57e70c911828 (patch)
treee16f07967d357663ca74014ea79006a4d90b6f32
parentd4c3f44ade58c4806e4abad87d08cf86ba92e614 (diff)
downloadprosody-f53ff863f09b78d7cadd6e59cbdb57e70c911828.tar.gz
prosody-f53ff863f09b78d7cadd6e59cbdb57e70c911828.zip
mod_external_services: Also validate services added by other modules
This ensures that problems with entries added other modules, e.g. mod_turn_external, are reported on startup. However, this depends on load order and whether a `module:depends()` call comes before the `module:add_item()` call. A followup commit will do something about that.
-rw-r--r--plugins/mod_external_services.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_external_services.lua b/plugins/mod_external_services.lua
index e18e7c3e..cb917fe8 100644
--- a/plugins/mod_external_services.lua
+++ b/plugins/mod_external_services.lua
@@ -100,7 +100,8 @@ end
function module.load()
-- Trigger errors on startup
- local services = configured_services / prepare;
+ local extras = module:get_host_items("external_service");
+ local services = ( configured_services + extras ) / prepare;
if #services == 0 then
module:log("warn", "No services configured or all had errors");
end