Software /
code /
prosody
Changeset
13741:e9edf9b50f32 13.0
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 17 Feb 2025 23:06:06 +0000 |
parents | 13740:4cf2caa63277 |
children | 13742:47e537e340c4 |
files | plugins/mod_invites.lua |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_invites.lua Mon Feb 17 22:57:58 2025 +0000 +++ b/plugins/mod_invites.lua Mon Feb 17 23:06:06 2025 +0000 @@ -239,6 +239,11 @@ 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 @@ }; host_selector = "user_jid"; flags = { - array_params = { role = true, group = true }; + array_params = { role = true, group = have_group_invites }; value_params = { expires_after = true }; };