From 19024b49c786e2eb705e66ef11413f476977409c Mon Sep 17 00:00:00 2001 From: Amolith Date: Thu, 4 Dec 2025 13:59:03 -0700 Subject: [PATCH] fix(admin_command): handle false from registered? Use `(reg || nil)&.phone` instead of `reg && reg.phone` to satisfy Style/SafeNavigation while still handling false (not just nil). Assisted-by: Claude Opus 4.5 via Crush --- lib/admin_command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/admin_command.rb b/lib/admin_command.rb index f1e115599dec04004a66c2584be812cd723687c9..0fe943bdbc7a8154ff201d884d0a83682081826b 100644 --- a/lib/admin_command.rb +++ b/lib/admin_command.rb @@ -87,7 +87,7 @@ class AdminCommand reg = @target_customer.registered? vars = { notice: notice, customer_id: @target_customer.customer_id, - jid: @target_customer.jid, tel: reg&.phone } + jid: @target_customer.jid, tel: (reg || nil)&.phone } reply(FormTemplate.render("admin_menu", **vars)).then do |response| if response.form.field("action") handle(response.form.field("action").value, response.action)