# HG changeset patch # User Kim Alvefur # Date 1686135292 -7200 # Node ID 46e512f4ba14977fffe14e9f91646226ed92b9ab # Parent 87268f4e6a2e4db184a4dc0da7e13414c38035f0 mod_http_oauth2: Simplify template using if-falsy operator Relies on Prosody rev af1e3b7d9ea3 which added the {var~if-falsy}, released in 0.12. Since this module requires trunk this is fine. diff -r 87268f4e6a2e -r 46e512f4ba14 mod_http_oauth2/html/login.html --- a/mod_http_oauth2/html/login.html Wed Jun 07 12:31:52 2023 +0200 +++ b/mod_http_oauth2/html/login.html Wed Jun 07 12:54:52 2023 +0200 @@ -16,7 +16,7 @@

{state.error}

}
-
+

diff -r 87268f4e6a2e -r 46e512f4ba14 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Wed Jun 07 12:31:52 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed Jun 07 12:54:52 2023 +0200 @@ -801,7 +801,6 @@ local extra = {}; if params.login_hint then extra.username_hint = (jid.prepped_split(params.login_hint)); - extra.no_username_hint = not extra.username_hint; end return render_page(templates.login, { state = auth_state; client = client; extra = extra }); elseif auth_state.consent == nil then