Skip to content

Commit

Permalink
Don't marshal text property of links when it's empty
Browse files Browse the repository at this point in the history
Slack returns an error if the text property is empty, but if it's not
present everything is fine and it just uses the URL as the text of the
link.
  • Loading branch information
pipt committed Jan 10, 2025
1 parent a45849a commit 3402f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block_rich_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func NewRichTextSectionEmojiElement(name string, skinTone int, style *RichTextSe
type RichTextSectionLinkElement struct {
Type RichTextSectionElementType `json:"type"`
URL string `json:"url"`
Text string `json:"text"`
Text string `json:"text,omitempty"`
Style *RichTextSectionTextStyle `json:"style,omitempty"`
}

Expand Down

0 comments on commit 3402f82

Please sign in to comment.