Diff

mod_http_upload/mod_http_upload.lua @ 3549:b059a3fb2a58

Update modules using mod_http_files to serve files for change in Prosody trunk See commits in Prosody: f1594893998f afc48785f738 a39f3681d685 c93fdec624c7
author Kim Alvefur <zash@zash.se>
date Fri, 05 Apr 2019 18:57:51 +0200
parent 3446:a5a50cd34386
child 3588:85057c4e7b66
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua	Wed Apr 03 11:57:37 2019 +0200
+++ b/mod_http_upload/mod_http_upload.lua	Fri Apr 05 18:57:51 2019 +0200
@@ -44,7 +44,13 @@
 module:depends("http");
 module:depends("disco");
 
-local http_files = module:depends("http_files");
+local http_files;
+
+if not pcall(function ()
+	http_files = require "net.http.files";
+end) then
+	http_files = module:depends"http_files";
+end
 
 -- namespaces
 local namespace = "urn:xmpp:http:upload:0";