mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
mod_invites: Hide --group flag unless mod_invites_groups is enabled
The WIP groups support is not complete yet, and won't work without extra modules (which are not yet a part of Prosody). For now we hide --group support unless mod_invites_groups (community module) is specified in modules_enabled.
This commit is contained in:
parent
edc68f5407
commit
13dc010593
1 changed files with 6 additions and 1 deletions
|
@ -239,6 +239,11 @@ end
|
|||
module:hook("invite-created", add_landing_url, -1);
|
||||
|
||||
--- shell command
|
||||
-- COMPAT: Dynamic groups are work in progress as of 13.0, so we'll use the
|
||||
-- presence of mod_invites_groups (a community module) to determine whether to
|
||||
-- expose our support for invites to groups.
|
||||
local have_group_invites = module:get_option_inherited_set("modules_enabled"):contains("invites_groups");
|
||||
|
||||
module:add_item("shell-command", {
|
||||
section = "invite";
|
||||
section_desc = "Create and manage invitations";
|
||||
|
@ -249,7 +254,7 @@ module:add_item("shell-command", {
|
|||
};
|
||||
host_selector = "user_jid";
|
||||
flags = {
|
||||
array_params = { role = true, group = true };
|
||||
array_params = { role = true, group = have_group_invites };
|
||||
value_params = { expires_after = true };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue