From 0f520ec8f3942c581f039e66a06f9c315e57a74c Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 21 Oct 2026 18:35:59 -0700 Subject: [PATCH] style: format java listeners with spotless Co-Authored-By: Claude --- .../CustomStepButtonActionListener.java | 9 +++++---- .../functions/SampleStepListener.java | 18 +++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/main/java/listeners/actions/CustomStepButtonActionListener.java b/src/main/java/listeners/actions/CustomStepButtonActionListener.java index c70a1f4..aecc4d9 100644 --- a/src/main/java/listeners/actions/CustomStepButtonActionListener.java +++ b/src/main/java/listeners/actions/CustomStepButtonActionListener.java @@ -30,10 +30,11 @@ public Response apply(BlockActionRequest req, ActionContext ctx) throws IOExcept .asString()); try { ctx.complete(outputs); - ctx.client().chatUpdate(r -> r.channel( - req.getPayload().getContainer().getChannelId()) - .ts(req.getPayload().getContainer().getMessageTs()) - .text("Thank you :heart_hands: for clicking a button!")); + ctx.client() + .chatUpdate( + r -> r.channel(req.getPayload().getContainer().getChannelId()) + .ts(req.getPayload().getContainer().getMessageTs()) + .text("Thank you :heart_hands: for clicking a button!")); } catch (Exception e) { ctx.logger.error("Failed to call complete() or views.update API (error: {})", e.getMessage(), e); } diff --git a/src/main/java/listeners/functions/SampleStepListener.java b/src/main/java/listeners/functions/SampleStepListener.java index f4029d4..6cf88a9 100644 --- a/src/main/java/listeners/functions/SampleStepListener.java +++ b/src/main/java/listeners/functions/SampleStepListener.java @@ -27,13 +27,17 @@ public Response apply(EventsApiPayload event, EventContex this.app.executorService().submit(() -> { context.logger.info("event: {}", event); try { - context.client().chatPostMessage(r -> r.channel( - event.getEvent().getInputs().get("user_id").asString()) - .text(":wave: hey") - .blocks(asBlocks(actions(a -> a.blockId(Constants.BlockIds.CUSTOM_STEP_BUTTON) - .elements(asElements(button(b -> b.actionId(Constants.ActionIds.CUSTOM_STEP_BUTTON) - .value("clicked") - .text(plainText("click me!"))))))))); + context.client() + .chatPostMessage(r -> r.channel(event.getEvent() + .getInputs() + .get("user_id") + .asString()) + .text(":wave: hey") + .blocks(asBlocks(actions(a -> a.blockId(Constants.BlockIds.CUSTOM_STEP_BUTTON) + .elements(asElements( + button(b -> b.actionId(Constants.ActionIds.CUSTOM_STEP_BUTTON) + .value("clicked") + .text(plainText("click me!"))))))))); } catch (Exception e) { context.logger.error("Failed to call chatPostMessage API (error: {})", e.getMessage(), e); }