-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
What happened
The slack.NewRichTextChannelElement
functions returns a RichTextElement
with "type": "text"
instead of "type": "channel"
. Causing the block to be invalid since the value for "text"
is missing and not displaying channels correctly.
Lines 329 to 331 in e29b7e3
func NewRichTextSectionChannelElement(channelID string, style *RichTextSectionTextStyle) *RichTextSectionChannelElement { | |
return &RichTextSectionChannelElement{ | |
Type: RTSEText, |
Workaround
Use the struct value
slack.RichTextSectionChannelElement{
Type: slack.RTSEChannel,
ChannelID: "channel-id",
}
Expected behavior
The function should create a RichTextChannel
element with type channel
Steps to reproduce
- Use the
slack.NewRichTextChannelElement
function in blocks code. - Attempt to send via
PostMessage
reproducible code
slack.NewRichTextChannelElement("channel_id", nil)
manifest.yaml
N/A
Versions
- Go:
1.23.9
- slack-go/slack:
v0.16.0
Metadata
Metadata
Assignees
Labels
No labels