Diff

plugins/mod_external_services.lua @ 11627:3a5212fd7e8e

mod_external_services: Validate items as they are added
author Kim Alvefur <zash@zash.se>
date Mon, 21 Jun 2021 22:41:59 +0200
parent 11626:ef62d29c8fdc
child 11628:0807e835d3b5
line wrap: on
line diff
--- 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;