You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a script to send a text through slack.NewHeaderBlock it displayed that runtime error: invalid memory address or nil pointer dereference which referred to the block_header.go:34
Expected behavior
Sended a block header formatting to the Slack
Steps to reproduce
reproducible code
headerText := slack.NewTextBlockObject("mrkdwn", "You have a new request:\n*<fakeLink.toEmployeeProfile.com|Fred Enriquez - New device request>*", false, false)
headerSection := slack.NewHeaderBlock(headerText, nil)
blocksExample := []slack.Block{
headerSection,
}
token := os.Getenv("SLACK_AUTH_TOKEN")
channelId := os.Getenv("SLACK_CHANNEL_ID")
client := slack.New(token, slack.OptionDebug(true))
_, block, err := client.PostMessage(channelId, slack.MsgOptionBlocks(blocksExample...))
fmt.Printf("Block: %s\n", block)
if err != nil {
panic(err)
}
Versions
Go: v1.20.8 linux/amd64
slack-go/slack: v0.12.3
The text was updated successfully, but these errors were encountered:
What happened
When running a script to send a text through
slack.NewHeaderBlock
it displayed thatruntime error: invalid memory address or nil pointer dereference
which referred to theblock_header.go:34
Expected behavior
Sended a block header formatting to the Slack
Steps to reproduce
reproducible code
Versions
The text was updated successfully, but these errors were encountered: