Software /
code /
prosody-modules
Changeset
6226:1b109900beae
mod_invite: Remove compatibility with 0.11
author | Link Mauve <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 09 Apr 2025 19:05:06 +0200 |
parents | 6225:2b20236bce3e |
children | 6227:dfdf0bf1e84f |
files | mod_invite/mod_invite.lua |
diffstat | 1 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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; };