# HG changeset patch # User Matthew Wild # Date 1651853346 -3600 # Node ID a44c328028ad7e36a35ae94321744d232a8e555e # Parent 1c5cb4c49c50d5df68ebdfacf9e6f6f0edb85256# Parent dc0c20753d6c69b8a25b2850ef17baafaeb99f3b Merge 0.12->trunk diff -r 1c5cb4c49c50 -r a44c328028ad plugins/mod_invites_adhoc.lua --- a/plugins/mod_invites_adhoc.lua Thu May 05 14:15:15 2022 +0200 +++ b/plugins/mod_invites_adhoc.lua Fri May 06 17:09:06 2022 +0100 @@ -45,7 +45,11 @@ local function may_invite_new_users(jid) if usermanager.get_roles then local user_roles = usermanager.get_roles(jid, module.host); - if not user_roles then return; end + if not user_roles then + -- User has no roles we can check, just return default + return allow_user_invites; + end + if user_roles["prosody:admin"] then return true; end