Skip to content

Commit b9c1b63

Browse files
authored
Add title to EventContext#setSuggestedPrompts argument list (#1390)
1 parent cc8632e commit b9c1b63

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List<Sugg
123123
}
124124
}
125125

126+
public AssistantThreadsSetSuggestedPromptsResponse setSuggestedPrompts(List<SuggestedPrompt> prompts, String title) throws IOException, SlackApiException {
127+
if (isAssistantThreadEvent()) {
128+
return this.client().assistantThreadsSetSuggestedPrompts(r -> r
129+
.channelId(this.getChannelId())
130+
.threadTs(this.getThreadTs())
131+
.prompts(prompts)
132+
.title(title)
133+
);
134+
} else {
135+
throw new IllegalStateException("This utility is only available for Assistant feature enabled app!");
136+
}
137+
}
138+
126139
// X-Slack-Retry-Num: 2 in HTTP Mode
127140
// "retry_attempt": 0, in Socket Mode
128141
private Integer retryNum;

0 commit comments

Comments
 (0)