Skip to content

Commit

Permalink
Add title to EventContext#setSuggestedPrompts argument list
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Oct 28, 2024
1 parent 52b04eb commit 84f0f4c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List<Sugg
}
}

public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List<SuggestedPrompt> prompts, String title) throws IOException, SlackApiException {
if (isAssistantThreadEvent()) {
return this.client().assistantThreadsSetSuggestedPrompts(r -> r
.channelId(this.getChannelId())
.threadTs(this.getThreadTs())
.prompts(prompts)
.title(title)

Check warning on line 132 in bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java

View check run for this annotation

Codecov / codecov/patch

bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java#L128-L132

Added lines #L128 - L132 were not covered by tests
);
} else {
throw new IllegalStateException("This utility is only available for Assistant feature enabled app!");

Check warning on line 135 in bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java

View check run for this annotation

Codecov / codecov/patch

bolt/src/main/java/com/slack/api/bolt/context/builtin/EventContext.java#L135

Added line #L135 was not covered by tests
}
}

// X-Slack-Retry-Num: 2 in HTTP Mode
// "retry_attempt": 0, in Socket Mode
private Integer retryNum;
Expand Down

0 comments on commit 84f0f4c

Please sign in to comment.