Software /
code /
prosody-modules
Changeset
4303:d261233f7ced
Improve UX by providing defaults users expect
author | Seve Ferrer <seve@delape.net> |
---|---|
date | Fri, 18 Dec 2020 15:28:12 +0100 |
parents | 4302:c9e1eee6a948 |
children | 4304:aec8148df26a |
files | mod_muc_http_auth/README.md mod_muc_http_auth/mod_muc_http_auth.lua |
diffstat | 2 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_http_auth/README.md Tue Dec 15 23:40:18 2020 +0000 +++ b/mod_muc_http_auth/README.md Fri Dec 18 15:28:12 2020 +0100 @@ -52,7 +52,7 @@ -- muc_http_auth_enabled_for = {"teaparty"} -- muc_http_auth_disabled_for = {"teaparty"} ``` -If none or both are found, all rooms in the MUC component will have this module enabled. +If none is set, all rooms in the MUC component will have this module enabled. Note: Use the node part of the MUC jid for these lists. Example:
--- a/mod_muc_http_auth/mod_muc_http_auth.lua Tue Dec 15 23:40:18 2020 +0000 +++ b/mod_muc_http_auth/mod_muc_http_auth.lua Fri Dec 18 15:28:12 2020 +0100 @@ -12,9 +12,8 @@ local authorize_registration = module:get_option("muc_http_auth_authorize_registration", false) local function must_be_authorized(room_node) - -- If none or both of these are set, all rooms need authorization + -- If none of these is set, all rooms need authorization if not enabled_for and not disabled_for then return true; end - if enabled_for and disabled_for then return true; end if enabled_for then return enabled_for:contains(room_node); end if disabled_for then return not disabled_for:contains(room_node); end