Software / code / prosody-modules
Comparison
mod_register_apps/mod_register_apps.lua @ 6230:8c98b1dd1ad3
mod_register_apps: Remove compatibility with 0.11
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Wed, 09 Apr 2025 19:05:35 +0200 |
| parent | 6096:fe380764032d |
comparison
equal
deleted
inserted
replaced
| 6229:eb8659ba53e5 | 6230:8c98b1dd1ad3 |
|---|---|
| 1 -- luacheck: ignore 631 | 1 -- luacheck: ignore 631 |
| 2 module:depends("http"); | 2 module:depends("http"); |
| 3 local http_files | 3 local http_files = require "net.http.files"; |
| 4 if prosody.process_type then | |
| 5 -- Prosody >= 0.12 | |
| 6 http_files = require "net.http.files"; | |
| 7 else | |
| 8 -- Prosody <= 0.11 | |
| 9 http_files = module:depends "http_files"; | |
| 10 end | |
| 11 | 4 |
| 12 local app_config = module:get_option("site_apps", { | 5 local app_config = module:get_option("site_apps", { |
| 13 { | 6 { |
| 14 name = "Conversations"; | 7 name = "Conversations"; |
| 15 text = [[Conversations is a Jabber/XMPP client for Android 6.0+ smartphones that has been optimized to provide a unique mobile experience.]]; | 8 text = [[Conversations is a Jabber/XMPP client for Android 6.0+ smartphones that has been optimized to provide a unique mobile experience.]]; |
| 223 svg = "image/svg+xml"; | 216 svg = "image/svg+xml"; |
| 224 }; | 217 }; |
| 225 | 218 |
| 226 module:provides("http", { | 219 module:provides("http", { |
| 227 route = { | 220 route = { |
| 228 ["GET /assets/*"] = http_files and http_files.serve({ | 221 ["GET /assets/*"] = http_files.serve({ |
| 229 path = module:get_directory().."/assets"; | 222 path = module:get_directory().."/assets"; |
| 230 mime_map = mime_map; | 223 mime_map = mime_map; |
| 231 }); | 224 }); |
| 232 }; | 225 }; |
| 233 }); | 226 }); |