ActionsBlock elements are not parsed
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
@KharchenkoDmitriy Thanks a lot for taking the time to report this issue. You are right. This seems to be a long-lived bug. We will be fixing this issue early next year. If you help us fix this issue by sending a pull request (with a corresponding unit test here), that's also amazing!
@seratch Thanks for fast reply. Which branch should I target for pull request? If its ok, I`m going to make a PR for both v2 and v3
@KharchenkoDmitriy Sending PRs to both v3 and main (for v3) is greatly helpful!