Skip to content

ActionsBlock elements are not parsed #903

Description

@KharchenkoDmitriy

Description

In ActionsBlock init, elements are simplie copied.
Exact bug place

For all other Blocks, similar elements are parsed into BlockElement
How it parsed for SectionBlock
How it is parsed for ContextBlock

To fix this we can deal with it the same way as in ContextBlock -> replace this line of code by
self.elements = BlockElement.parse_all(elements)

Also the same issue present in current sdk version(3.1.0)
Link for bug place in 3.1.0

Reproducible in:

The Slack SDK version

slackclient==2.9.3

Python runtime version

Python 3.7.0

OS info

Ubuntu 20.04.1 LTS

Steps to reproduce:

1.Copy example json from slack API docs for ActionsBlock (https://api.slack.com/reference/block-kit/blocks#actions_examples)
2.Create an ActionsBlock from parsed (to dict) json
3. Check the type of elements attribute from created ActionsBlock object

Expected result:

Elements should be instances of BlockElement, the same as it is for SectionBlock.accessory

Actual result:

Elements of ActionsBlock is not parsed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Version: 3xbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedgood first issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions