This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Fix for properly processing Slack payloads#1605
Closed
omid-jf wants to merge 4 commits into
Closed
Conversation
1. Added SlackText class to represent a text object of Slack 2. Added SlackAction class to represent an action block object of Slack 3. Changed SlackPayload class to use SlackAction for actions 4. Changed SlackEvent class to use SlackAction for actions 5. The user ID of a received event from Slack is in event.user and not in event.user_id 6. Populated the timestamp property of even objects from event.event_ts by converting to UTC datetime 7. Typo and type mismatch fixes
Member
|
@omid-jf Thank! I'd be glad to approve and merge this. The PR validation is failing because you need to run the black formatter on slack_helper.py. |
Author
|
@tracyboehrer The checks are still failing after running the black formatter on slack_helper.py |
Contributor
|
@axelsrz Can you land this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1548
Description
Most of the changes are ports from the dotnet code. This PR is required to handle Slack actions (such as clicking on buttons) properly. Moreover, there are several type mismatches that result in many None values (for example, payload.channel is a dictionary and payload.channel.id is used instead of payload.channel.get("id")).
Note: There are some overlaps with PR #1559
Specific Changes