comparison mod_http_muc_log/mod_http_muc_log.lua @ 6193: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 0ee77be396b9
children ef969153ef65
comparison
equal deleted inserted replaced
6192:0bd1804baae7 6193:2b20236bce3e
579 }); 579 });
580 end 580 end
581 581
582 local serve_static 582 local serve_static
583 do 583 do
584 if prosody.process_type == "prosody" then 584 local http_files = require "net.http.files";
585 -- Prosody >= 0.12
586 local http_files = require "net.http.files";
587 serve = http_files.serve;
588 else
589 -- Prosody <= 0.11
590 serve = module:depends "http_files".serve;
591 end
592 local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css"; js = "application/javascript" }; 585 local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css"; js = "application/javascript" };
593 serve_static = serve({ path = resources; mime_map = mime_map }); 586 serve_static = http_files.serve({ path = resources; mime_map = mime_map });
594 end 587 end
595 588
596 module:provides("http", { 589 module:provides("http", {
597 title = module:get_option_string("name", "Chatroom logs"); 590 title = module:get_option_string("name", "Chatroom logs");
598 route = { 591 route = {