Not possible to set initial value of RichTextInputBlockElement due to wrong type
Opened this issue · 0 comments
matcornic commented
Hello maintainers,
First, thanks a lot for this lib, it's very useful for us.
I encountered a bug: I can't set an initial value for the RichTextInputBlockElement due the type being a string and not a Rich text object
What happened
I tried to use this code, which is compiling on :
elem := slack.NewRichTextInputBlockElement(nil, "test")
elem.InitialValue = "test"
elemInput := slack.NewInputBlock("", slack.NewTextBlockObject("plain_text", "Test:", false, false), nil, elemInput)
But got an invalid_block
error on Slack while checking the generated json on the Block kit builder
Seeing the documentation, it expects a Rich text object https://api.slack.com/reference/block-kit/block-elements#rich_text_input
Versions
- Go: 1.20
- slack-go/slack: v0.12.5