Changeset

6228:b74ec363de08

mod_jsxc: Remove compatibility with 0.11
author Link Mauve <linkmauve@linkmauve.fr>
date Wed, 09 Apr 2025 19:05:21 +0200
parents 6227:dfdf0bf1e84f
children 6229:eb8659ba53e5
files mod_jsxc/mod_jsxc.lua
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mod_jsxc/mod_jsxc.lua	Wed Apr 09 19:05:14 2025 +0200
+++ b/mod_jsxc/mod_jsxc.lua	Wed Apr 09 19:05:21 2025 +0200
@@ -19,17 +19,9 @@
 local serve_dist = nil;
 local resources = module:get_option_path("jsxc_resources");
 if resources then
-	local serve;
-	if prosody.process_type == "prosody" then
-		-- Prosody >= trunk / 0.12
-		local http_files = require "net.http.files";
-		serve = http_files.serve;
-	else
-		-- Prosody <= 0.11
-		serve = module:depends "http_files".serve;
-	end
+	local http_files = require "net.http.files";
 	local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css", js = "application/javascript" };
-	serve_dist = serve({ path = resources, mime_map = mime_map });
+	serve_dist = http_files.serve({ path = resources, mime_map = mime_map });
 
 	cdn_url = module:http_url();
 end