Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received Slack payloads are not processed properly #1548

Closed
omid-jf opened this issue Feb 21, 2021 · 5 comments · Fixed by #1559 · May be fixed by #1605
Closed

Received Slack payloads are not processed properly #1548

omid-jf opened this issue Feb 21, 2021 · 5 comments · Fixed by #1559 · May be fixed by #1605
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Issue is created by anyone that is not a collaborator in the repository.
Milestone

Comments

@omid-jf
Copy link

omid-jf commented Feb 21, 2021

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

@omid-jf omid-jf added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Feb 21, 2021
@omid-jf
Copy link
Author

omid-jf commented Feb 21, 2021

Another related bug:

Line 29 of the same file (slack_payload.py) has an incorrect syntax (check the screenshot below).
if isinstance(message) is SlackMessage
should be changed to:
if isinstance(message, SlackMessage)

ms_bot_bug2

@stevkan stevkan added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels Feb 22, 2021
@congysu congysu removed the needs-triage The issue has just been created and it has not been reviewed by the team. label Feb 22, 2021
@congysu
Copy link
Member

congysu commented Feb 23, 2021

Thanks @axelsrz to take a look at this item.

@congysu
Copy link
Member

congysu commented Feb 25, 2021

@axelsrz could you please take a look at this one? Thanks.

@axelsrz
Copy link
Member

axelsrz commented Feb 25, 2021

bringing @tracyboehrer into the loop

@axelsrz axelsrz assigned tracyboehrer and unassigned axelsrz Feb 25, 2021
@tracyboehrer tracyboehrer added this to the r13 milestone Mar 3, 2021
@tracyboehrer
Copy link
Member

@omid-jf Thanks for reporting this. I'll get setup to test and correct this, and get it into the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Issue is created by anyone that is not a collaborator in the repository.
Projects
None yet
5 participants