Skip to content

Commit

Permalink
Remove title from setSuggestedPrompts calls
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Sep 18, 2024
1 parent 1e7570d commit ab613c3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static void main(String[] args) throws Exception {
ctx.client().assistantThreadsSetSuggestedPrompts(r -> r
.channelId(channelId)
.threadTs(threadTs)
.title("How are you?")
.prompts(Collections.singletonList(new SuggestedPrompt("What does SLACK stand for?")))
);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void main(String[] args) throws Exception {
assistant.threadStarted((req, ctx) -> {
try {
ctx.say(r -> r.text("Hi, how can I help you today?"));
ctx.setSuggestedPrompts("How are you?", Collections.singletonList(
ctx.setSuggestedPrompts(Collections.singletonList(
SuggestedPrompt.create("What does SLACK stand for?")
));
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,10 @@ public AssistantThreadsSetStatusResponse setStatus(String status) throws IOExcep
}

public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List<SuggestedPrompt> prompts) throws IOException, SlackApiException {
return this.setSuggestedPrompts(null, prompts);
}

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

Check warning on line 119 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#L116-L119

Added lines #L116 - L119 were not covered by tests
);
} else {
Expand Down

0 comments on commit ab613c3

Please sign in to comment.