# HG changeset patch # User Seve Ferrer # Date 1608301692 -3600 # Node ID d261233f7cedf384a3697b42533473eba13ff49b # Parent c9e1eee6a9480ac8445b27f6d891329b1025f0ea Improve UX by providing defaults users expect diff -r c9e1eee6a948 -r d261233f7ced mod_muc_http_auth/README.md --- 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: diff -r c9e1eee6a948 -r d261233f7ced mod_muc_http_auth/mod_muc_http_auth.lua --- 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