Skip to content

Received Slack payloads are not processed properly #1548

@omid-jf

Description

@omid-jf

Version

v4.11.0

Describe the bug

When content received from Slack is in type application/x-www-form-urlencoded, a dictionary called request_dict is created from the body using the query_string_to_dictionary method of the SlackHelper class. The resulting dictionary has one key called payload and its value is a dictionary with several key-values ({"type": ..., "user": ..., etc.}).
Later, a SlackPayload object is created from the key-values. However, the constructor of the SlackPayload class gets the values of the nested dictionary without getting the value of first key. Therefore, everything turns to be None in that object.

To Reproduce

  1. Use the 60.slack-adapter sample.
  2. Put a breakpoint in line 11 of botbuilder/adapters/slack/slack_payload.py and start debugging.
  3. Use the /test command in Slack (requires registering the command in the Slack application).
  4. In Slack, click on of the buttons sent from the bot.

Expected behavior

The created SlackPayload object should contain information about the Slack action.

Screenshots

ms_bot_bug

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-reportedIssue is created by anyone that is not a collaborator in the repository.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions