# HG changeset patch # User Matthew Wild # Date 1599482902 -3600 # Node ID 439ae12bb13638b2d00f4c9e42e5bfaa79d32831 # Parent 88a469b285f5bbd55725f9f2fb969892f0935615 mod_easy_invite: Remove hard dependency on mod_invites_page and allow configuration of different landing page module diff -r 88a469b285f5 -r 439ae12bb136 mod_easy_invite/mod_easy_invite.lua --- a/mod_easy_invite/mod_easy_invite.lua Mon Sep 07 13:33:42 2020 +0100 +++ b/mod_easy_invite/mod_easy_invite.lua Mon Sep 07 13:48:22 2020 +0100 @@ -5,6 +5,7 @@ local jid_split = require "util.jid".split; local split_jid = require "util.jid".split; local rostermanager = require "core.rostermanager"; +local modulemanager = require "core.modulemanager"; local st = require "util.stanza"; local invite_only = module:get_option_boolean("registration_invite_only", true); @@ -247,7 +248,10 @@ -- Load mod_invites invites = module:context(host):depends("invites"); - module:context(host):depends("invites_page"); + local invites_page_module = module:context(host):get_option_string("easy_invite_page_module", "invites_page"); + if modulemanager.get_modules_for_host(host):contains(invites_page_module) then + module:context(host):depends(invites_page_module); + end table.remove(arg, 1); table.remove(arg, 1);