diff options
author | Matthew Wild <mwild1@gmail.com> | 2025-02-17 23:06:06 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2025-02-17 23:06:06 +0000 |
commit | 13dc010593fc7968faa3bd713a43893a2dff4f19 (patch) | |
tree | 266907b0d43ce2254ec73431eabd1b5c06bf7a2f /plugins | |
parent | edc68f5407fb091564fdd7430b166297b0788795 (diff) | |
download | prosody-origin/13.0.tar.gz prosody-origin/13.0.zip |
mod_invites: Hide --group flag unless mod_invites_groups is enabledorigin/13.013.0
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_invites.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_invites.lua b/plugins/mod_invites.lua index 0da93215..c6a66a8f 100644 --- a/plugins/mod_invites.lua +++ b/plugins/mod_invites.lua @@ -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 }; }; |