Software /
code /
prosody-modules
Changeset
5040:fa99279f9d40
mod_invites_adhoc: Set non-nil defaults for options, fixes traceback (thanks Martin)
Fixes an error when attempting to call the :empty() method on the
default implicit default nil value.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 14 Sep 2022 17:21:42 +0200 |
parents | 5039:c0d243b27e64 |
children | 5041:afa09e069afb |
files | mod_invites_adhoc/mod_invites_adhoc.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_invites_adhoc/mod_invites_adhoc.lua Tue Sep 13 20:32:20 2022 +0100 +++ b/mod_invites_adhoc/mod_invites_adhoc.lua Wed Sep 14 17:21:42 2022 +0200 @@ -14,8 +14,8 @@ local allow_contact_invites = module:get_option_boolean("allow_contact_invites", true); -- These options are deprecated since module:may() -local allow_user_invite_roles = module:get_option_set("allow_user_invites_by_roles"); -local deny_user_invite_roles = module:get_option_set("deny_user_invites_by_roles"); +local allow_user_invite_roles = module:get_option_set("allow_user_invites_by_roles", {}); +local deny_user_invite_roles = module:get_option_set("deny_user_invites_by_roles", {}); if module.may then if allow_user_invites then