Non-list list-like parameters passed to API call are not serialized to JSON #337
Closed
4 of 9 tasks
Labels
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
Version: 1x
Description
When sending a list-like parameter to an API method (attachments to chat.postMessage, for example), only actual
list
anddict
are serialized to JSON. Sending atuple
is not serialized and the attachments are disregarded by the Slack API.What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
slackclient version: 1.2.1
python version: 2.7.14
OS version(s): macOS 10.13.5
Steps to reproduce:
SlackClient
with a proper tokenapi_call
method on the client, for the chat.postMessage API endpoint, with the following parameters:Expected result:
The message is displayed with two attachments.
Actual result:
Only the message text is displayed.
Potential fix:
I believe the type checking done in slackrequest.py could be loosened so that
tuple
s and other iterables could be supported as well.The text was updated successfully, but these errors were encountered: