Diff

mod_invite/mod_invite.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 3480:5911030a1a66
child 3552:5370bc374c83
line wrap: on
line diff
--- a/mod_invite/mod_invite.lua	Wed Apr 03 11:57:37 2019 +0200
+++ b/mod_invite/mod_invite.lua	Fri Apr 05 18:57:51 2019 +0200
@@ -12,7 +12,13 @@
 local invite_storage = module:open_store();
 local inviter_storage = module:open_store("inviter");
 
-local serve = module:depends"http_files".serve;
+local serve;
+if not pcall(function ()
+	local http_files = require "net.http.files";
+	serve = http_files.serve;
+end) then
+	serve = module:depends"http_files".serve;
+end
 
 module:depends"adhoc";
 module:depends"http";