# HG changeset patch # User Link Mauve # Date 1744218306 -7200 # Node ID 1b109900beae83e8cf8df5ee6607c8bba8eae288 # Parent 2b20236bce3e89a0016e2bd713089232a93c360c mod_invite: Remove compatibility with 0.11 diff -r 2b20236bce3e -r 1b109900beae mod_invite/mod_invite.lua --- a/mod_invite/mod_invite.lua Wed Apr 09 19:04:58 2025 +0200 +++ b/mod_invite/mod_invite.lua Wed Apr 09 19:05:06 2025 +0200 @@ -7,19 +7,12 @@ local rostermanager = require "core.rostermanager"; local tohtml = require "util.stanza".xml_escape local nodeprep = require "util.encodings".stringprep.nodeprep; +local http_files = require "net.http.files"; local tostring = tostring; local invite_storage = module:open_store(); local inviter_storage = module:open_store("inviter"); -local serve; -if prosody.process_type == "prosody" then - local http_files = require "net.http.files"; - serve = http_files.serve; -else - serve = module:depends"http_files".serve; -end - module:depends"adhoc"; module:depends"http"; @@ -132,7 +125,7 @@ module:provides("http", { route = { - ["GET /bootstrap.min.css"] = serve(module:get_directory() .. "/invite/bootstrap.min.css"); + ["GET /bootstrap.min.css"] = http_files.serve(module:get_directory() .. "/invite/bootstrap.min.css"); ["GET /*"] = generate_page; POST = handle_form; };