python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

(Set a clear title describing the issue)

Open healroot opened this issue 5 years ago • 0 comments

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

healroot avatar Dec 23 '20 12:12 healroot