Mercurial > prosody-modules
comparison mod_password_reset/mod_password_reset.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 | 3bc68057f232 |
children | 7fc6a63c3bd0 |
comparison
equal
deleted
inserted
replaced
3548:8a15a9b13881 | 3549:b059a3fb2a58 |
---|---|
12 | 12 |
13 local reset_tokens = module:open_store(); | 13 local reset_tokens = module:open_store(); |
14 | 14 |
15 local max_token_age = module:get_option_number("password_reset_validity", 86400); | 15 local max_token_age = module:get_option_number("password_reset_validity", 86400); |
16 | 16 |
17 local serve = module:depends"http_files".serve; | 17 local serve; |
18 if not pcall(function () | |
19 local http_files = require "net.http.files"; | |
20 serve = http_files.serve; | |
21 end) then | |
22 serve = module:depends"http_files".serve; | |
23 end | |
18 | 24 |
19 module:depends("adhoc"); | 25 module:depends("adhoc"); |
20 module:depends("http"); | 26 module:depends("http"); |
21 local password_policy = module:depends("password_policy"); | 27 local password_policy = module:depends("password_policy"); |
22 | 28 |