Software /
code /
prosody-modules
Diff
mod_invites_adhoc/mod_invites_adhoc.lua @ 5593:04f36a470dca
Update from upstream
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Sun, 09 Jul 2023 01:31:29 +0700 |
parent | 5582:825c6fb76c48 |
line wrap: on
line diff
--- a/mod_invites_adhoc/mod_invites_adhoc.lua Fri May 26 02:15:45 2023 +0700 +++ b/mod_invites_adhoc/mod_invites_adhoc.lua Sun Jul 09 01:31:29 2023 +0700 @@ -19,7 +19,11 @@ if module.may then if allow_user_invites then - module:default_permission("prosody:user", ":invite-new-users"); + if require "core.features".available:contains("split-user-roles") then + module:default_permission("prosody:registered", ":invite-new-users"); + else -- COMPAT + module:default_permission("prosody:user", ":invite-new-users"); + end end if not allow_user_invite_roles:empty() or not deny_user_invite_roles:empty() then return error("allow_user_invites_by_roles and deny_user_invites_by_roles are deprecated options");