Mercurial > prosody-modules
comparison mod_register_apps/mod_register_apps.lua @ 5178:556bf57d6417
mod_register_apps: Detect 0.12+ when called from prosodyctl
Otherwise it loads mod_http_files which logs a warning
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Feb 2023 21:07:13 +0100 |
parents | eb3f99d0e72d |
children | e06af1403a60 |
comparison
equal
deleted
inserted
replaced
5177:f6b5f04d4b28 | 5178:556bf57d6417 |
---|---|
1 -- luacheck: ignore 631 | 1 -- luacheck: ignore 631 |
2 module:depends("http"); | 2 module:depends("http"); |
3 local http_files | 3 local http_files |
4 if prosody.process_type == "prosody" then | 4 if prosody.process_type then |
5 -- Prosody >= 0.12 | 5 -- Prosody >= 0.12 |
6 http_files = require "net.http.files"; | 6 http_files = require "net.http.files"; |
7 else | 7 else |
8 -- Prosody <= 0.11 | 8 -- Prosody <= 0.11 |
9 http_files = module:depends "http_files"; | 9 http_files = module:depends "http_files"; |