Changeset

6223:767b8594fb9d

mod_conversejs: Remove compatibility with 0.11
author Link Mauve <linkmauve@linkmauve.fr>
date Wed, 09 Apr 2025 19:04:39 +0200
parents 6222:963c16e417d6
children 6224:0bd1804baae7
files mod_conversejs/mod_conversejs.lua
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mod_conversejs/mod_conversejs.lua	Wed Apr 09 19:04:30 2025 +0200
+++ b/mod_conversejs/mod_conversejs.lua	Wed Apr 09 19:04:39 2025 +0200
@@ -28,17 +28,9 @@
 local serve_dist = nil;
 local resources = module:get_option_path("conversejs_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