Skip to content

Commit f975dbd

Browse files
committed
Fix #410 Hint for a Modal Surface's Input block
1 parent e43b65c commit f975dbd

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

slack-api-model/src/main/java/com/slack/api/model/block/InputBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class InputBlock implements LayoutBlock {
3636
* It must be a a text object with a type of plain_text.
3737
* Maximum length for the text in this field is 2000 characters.
3838
*/
39-
private String hint;
39+
private PlainTextObject hint;
4040

4141
/**
4242
* A boolean that indicates whether the input element may be empty when a user submits the modal.

slack-api-model/src/test/java/test_locally/api/model/block/BlockKitTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public void parseInputOnes() {
2828
" \"type\": \"plain_text\",\n" +
2929
" \"text\": \"Label of input\"\n" +
3030
" },\n" +
31+
" \"hint\": {\n" +
32+
" \"type\": \"plain_text\",\n" +
33+
" \"text\": \"Hint of input\"\n" +
34+
" },\n" +
3135
" \"element\": {\n" +
3236
" \"type\": \"plain_text_input\",\n" +
3337
" \"action_id\": \"plain_input\",\n" +
@@ -42,6 +46,7 @@ public void parseInputOnes() {
4246
InputBlock inputBlock = (InputBlock) message.getBlocks().get(0);
4347
assertThat(inputBlock.getLabel(), is(notNullValue()));
4448
assertThat(inputBlock.getElement(), is(notNullValue()));
49+
assertThat(inputBlock.getHint(),is(notNullValue()));
4550
}
4651

4752
@Test

slack-api-model/src/test/java/test_locally/api/model/block/BlocksTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ public void testResponseUrlEnabled_conversations() {
242242
" \"type\": \"plain_text\",\n" +
243243
" \"text\": \"Choose the conversation to publish your result to:\",\n" +
244244
" \"emoji\": true\n" +
245+
" },\n" +
246+
" \"hint\": {\n" +
247+
" \"type\": \"plain_text\",\n" +
248+
" \"text\": \"Choose the conversation to publish your result to:\",\n" +
249+
" \"emoji\": true\n" +
245250
" }\n" +
246251
" }\n" +
247252
"]}";

0 commit comments

Comments
 (0)