Software /
code /
prosody-modules
Diff
mod_invites_page/mod_invites_page.lua @ 4402:85c11eb4331b
mod_invites_page: Allow disabling of built-in pages with invites_page_external option
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 27 Jan 2021 08:16:26 +0000 |
parent | 4129:ca099bd28bf5 |
child | 4408:2c47b8110c48 |
line wrap: on
line diff
--- a/mod_invites_page/mod_invites_page.lua Tue Jan 26 22:04:43 2021 +0100 +++ b/mod_invites_page/mod_invites_page.lua Wed Jan 27 08:16:26 2021 +0000 @@ -27,6 +27,9 @@ local site_name = module:get_option_string("site_name", module.host); local site_apps = module:shared("register_apps/apps"); +-- Enable/disable built-in invite pages +local external_only = module:get_option_boolean("invites_page_external", false); + local http_files; if prosody.shutdown then @@ -52,6 +55,10 @@ module:hook("invite-created", add_landing_url); +if external_only then + return; +end + local function render_app_urls(apps, invite_vars) local rendered_apps = {}; for _, unrendered_app in ipairs(apps) do