Changeset

6225:2b20236bce3e

mod_http_muc_log: Remove compatibility with 0.11
author Link Mauve <linkmauve@linkmauve.fr>
date Wed, 09 Apr 2025 19:04:58 +0200
parents 6224:0bd1804baae7
children 6226:1b109900beae
files mod_http_muc_log/mod_http_muc_log.lua
diffstat 1 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Wed Apr 09 19:04:49 2025 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Wed Apr 09 19:04:58 2025 +0200
@@ -581,16 +581,9 @@
 
 local serve_static
 do
-	if prosody.process_type == "prosody" then
-		-- Prosody >= 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_static = serve({ path = resources; mime_map = mime_map });
+	serve_static = http_files.serve({ path = resources; mime_map = mime_map });
 end
 
 module:provides("http", {