Skip to content

Commit 5242120

Browse files
Use complete rather the completeSuccess
1 parent 6db74e0 commit 5242120

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/listeners/actions/CustomStepButtonActionListener.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@ public Response apply(BlockActionRequest req, ActionContext ctx) throws IOExcept
2929
.get("user_id")
3030
.asString());
3131
try {
32-
ctx.client().functionsCompleteSuccess(r -> r.functionExecutionId(
33-
req.getPayload().getFunctionData().getExecutionId())
34-
.outputs(outputs));
32+
ctx.complete(outputs);
3533
ctx.client().chatUpdate(r -> r.channel(
3634
req.getPayload().getContainer().getChannelId())
3735
.ts(req.getPayload().getContainer().getMessageTs())
3836
.text("Thank you :heart_hands: for clicking a button!"));
3937
} catch (Exception e) {
40-
ctx.logger.error(
41-
"Failed to call functionsCompleteSuccess or views.update API (error: {})", e.getMessage(), e);
38+
ctx.logger.error("Failed to call complete() or views.update API (error: {})", e.getMessage(), e);
4239
}
4340
});
4441
return ctx.ack();

0 commit comments

Comments
 (0)