comparison 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
parents a5a50cd34386
children 85057c4e7b66
comparison
equal deleted inserted replaced
3548:8a15a9b13881 3549:b059a3fb2a58
42 42
43 -- depends 43 -- depends
44 module:depends("http"); 44 module:depends("http");
45 module:depends("disco"); 45 module:depends("disco");
46 46
47 local http_files = module:depends("http_files"); 47 local http_files;
48
49 if not pcall(function ()
50 http_files = require "net.http.files";
51 end) then
52 http_files = module:depends"http_files";
53 end
48 54
49 -- namespaces 55 -- namespaces
50 local namespace = "urn:xmpp:http:upload:0"; 56 local namespace = "urn:xmpp:http:upload:0";
51 local legacy_namespace = "urn:xmpp:http:upload"; 57 local legacy_namespace = "urn:xmpp:http:upload";
52 58