Comparison

mod_invites_api/mod_invites_api.lua @ 5636:7e5701fbae88

mod_invites_api: add `module:depends("http");` to use `module:http_url()` in `prosodyctl`.
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Mon, 31 Jul 2023 11:52:00 +0700
parent 5629:160868fdddd6
child 5637:38783b8acbc9
comparison
equal deleted inserted replaced
5635:99c0e675b969 5636:7e5701fbae88
304 if not prosody.hosts[domain] then 304 if not prosody.hosts[domain] then
305 print("Error: please supply a valid host."); 305 print("Error: please supply a valid host.");
306 return 1; 306 return 1;
307 end 307 end
308 require "core.storagemanager".initialize_host(domain); 308 require "core.storagemanager".initialize_host(domain);
309 module:depends("http");
309 module.host = domain; --luacheck: ignore 122/module 310 module.host = domain; --luacheck: ignore 122/module
310 usermanager.initialize_host(module.host); 311 usermanager.initialize_host(module.host);
311 api_key_store = module:open_store("invite_api_keys", "map"); 312 api_key_store = module:open_store("invite_api_keys", "map");
312 api_key_store_kv = module:open_store("invite_api_keys"); 313 api_key_store_kv = module:open_store("invite_api_keys");
313 314