Encode Mattermost payloads as UTF-8 - #7783
Open
DhruvShah-Dev wants to merge 1 commit into
Open
Conversation
Greptile SummaryThis PR aligns Mattermost webhook delivery with the Slack destination by explicitly encoding serialized JSON payloads as UTF-8 bytes.
Confidence Score: 5/5The PR appears safe to merge, with the UTF-8 payload behavior covered by a focused regression test. The changed request body remains valid serialized JSON while its encoding becomes explicit, matching an established sibling destination pattern without introducing a concrete failure.
|
| Filename | Overview |
|---|---|
| redash/destinations/mattermost.py | Explicitly UTF-8 encodes the serialized Mattermost webhook payload; no actionable regression was identified. |
| tests/destinations/test_mattermost.py | Adds focused coverage that the submitted body is bytes and preserves a non-ASCII alert subject. |
Reviews (1): Last reviewed commit: "Encode Mattermost payloads as UTF-8" | Re-trigger Greptile
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?
Bug fix
Description
Mattermost webhook payloads were passed to
requests.postas a Python string, which lets Requests encode the body as latin-1. This matches the Slack destination by sending UTF-8 bytes so non-ASCII alert text is preserved.Fixes #7775
Validation
git diff --checkpython -m pytest tests\destinations\test_mattermost.py(blocked locally: missing Redash runtime dependencyredis)