Mercurial > prosody-modules
comparison mod_register_apps/mod_register_apps.lua @ 4975:733e5513f691
various: Use 0.12+ API for serving files from the file system over HTTP
Using mod_http_files this way is deprecated. Having the base behavior in
a separate module makes it easier to have a specialized module with
coherent behavior that does not do things when not explicitly enabled.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 18 Jul 2022 13:58:27 +0200 |
parents | 0b084f63fed0 |
children | 75b6e5df65f9 |
comparison
equal
deleted
inserted
replaced
4974:807007913f67 | 4975:733e5513f691 |
---|---|
1 -- luacheck: ignore 631 | 1 -- luacheck: ignore 631 |
2 module:depends("http"); | 2 module:depends("http"); |
3 local http_files = module:depends("http_files"); | 3 local http_files |
4 if not pcall(function() | |
5 -- Prosody >= 0.12 | |
6 http_files = require "net.http.files"; | |
7 end) then | |
8 -- Prosody <= 0.11 | |
9 http_files = module:depends "http_files"; | |
10 end | |
4 | 11 |
5 local app_config = module:get_option("site_apps", { | 12 local app_config = module:get_option("site_apps", { |
6 { | 13 { |
7 name = "Conversations"; | 14 name = "Conversations"; |
8 text = [[Conversations is a Jabber/XMPP client for Android 4.0+ smartphones that has been optimized to provide a unique mobile experience.]]; | 15 text = [[Conversations is a Jabber/XMPP client for Android 4.0+ smartphones that has been optimized to provide a unique mobile experience.]]; |