fix(bug): added missing json=payload for the mattermost destination - #7779
Open
MkhalFadel wants to merge 3 commits into
Open
fix(bug): added missing json=payload for the mattermost destination #7779MkhalFadel wants to merge 3 commits into
MkhalFadel wants to merge 3 commits into
Conversation
Greptile SummaryThis PR fixes the Mattermost webhook destination by replacing
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| redash/destinations/mattermost.py | Replaces data=json_dumps(payload) with json=payload so requests automatically serializes the payload and sets the Content-Type: application/json header, fixing webhook delivery to Mattermost. The now-unused json_dumps import should be cleaned up. |
Sequence Diagram
sequenceDiagram
participant Redash
participant Mattermost
Note over Redash,Mattermost: Before fix
Redash->>Mattermost: "POST /webhook (data=json_string, no Content-Type header)"
Mattermost-->>Redash: 400 / ignored (missing Content-Type)
Note over Redash,Mattermost: After fix
Redash->>Mattermost: "POST /webhook (json=payload, Content-Type: application/json)"
Mattermost-->>Redash: 200 OK
Reviews (3): Last reviewed commit: "Merge branch 'master' into fix-mattermos..." | Re-trigger Greptile
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What type of PR is this?
Description
How is this tested?
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
The PR fixes missing .encode("utf-8") in the mattermost.py file for the Mattermost class in line 47