Software / code / prosody-modules
Diff
mod_jsxc/mod_jsxc.lua @ 6263:10a1016d1c3a
Merge update
| author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
|---|---|
| date | Sun, 01 Jun 2025 11:43:16 +0700 |
| parent | 6228:b74ec363de08 |
line wrap: on
line diff
--- a/mod_jsxc/mod_jsxc.lua Sun Jun 01 11:41:42 2025 +0700 +++ b/mod_jsxc/mod_jsxc.lua Sun Jun 01 11:43:16 2025 +0700 @@ -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