Software /
code /
prosody
Comparison
plugins/mod_external_services.lua @ 11626:ef62d29c8fdc
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 Jun 2021 22:38:30 +0200 |
parent | 11040:c560531d9a6e |
child | 11627:3a5212fd7e8e |
comparison
equal
deleted
inserted
replaced
11625:04abe65b8067 | 11626:ef62d29c8fdc |
---|---|
98 return srv; | 98 return srv; |
99 end | 99 end |
100 | 100 |
101 function module.load() | 101 function module.load() |
102 -- Trigger errors on startup | 102 -- Trigger errors on startup |
103 local services = configured_services / prepare; | 103 local extras = module:get_host_items("external_service"); |
104 local services = ( configured_services + extras ) / prepare; | |
104 if #services == 0 then | 105 if #services == 0 then |
105 module:log("warn", "No services configured or all had errors"); | 106 module:log("warn", "No services configured or all had errors"); |
106 end | 107 end |
107 end | 108 end |
108 | 109 |