# HG changeset patch # User Kim Alvefur # Date 1624308119 -7200 # Node ID 3a5212fd7e8ec195c2d7dbea626fa558e273cd03 # Parent ef62d29c8fdc7d59d97a807510502f99850e7055 mod_external_services: Validate items as they are added diff -r ef62d29c8fdc -r 3a5212fd7e8e plugins/mod_external_services.lua --- a/plugins/mod_external_services.lua Mon Jun 21 22:38:30 2021 +0200 +++ b/plugins/mod_external_services.lua Mon Jun 21 22:41:59 2021 +0200 @@ -107,6 +107,10 @@ end end +module:handle_items("external_service", function(added) + prepare(added.item); +end, module.load); + -- Ensure only valid items are added in events local services_mt = { __index = getmetatable(array()).__index;