Skip to content

Conversation

@wilsonehusin
Copy link
Collaborator

This changeset initializes RichText::List with elements attribute having [] (empty array).

For rich_text_list, Slack considers elements attribute to be required. As of today, Slack would error out when elements is absent, or when elements is null. However, they accept empty array just fine.

While there is not much point of creating rich_text_list block without any elements, we can avoid invalid_blocks error and still send something to Slack. This is consistent with other block definitions in the gems where required fields has default empty value

@wilsonehusin wilsonehusin requested a review from davidcelis May 29, 2025 17:46
@davidcelis davidcelis merged commit 6b24f34 into main May 29, 2025
2 checks passed
@davidcelis davidcelis deleted the rich-text-list-elements branch May 29, 2025 18:18
@wilsonehusin wilsonehusin changed the title Se rich_text_list with elements attribute of empty array by default Set rich_text_list with elements attribute of empty array by default May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants