Skip to content

Commit

Permalink
Send Discord response JSON using UTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
devblackops committed Nov 10, 2021
1 parent 0e9caed commit da076e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Microsoft Teams messages that have been pasted into the client are now parsed correctly.
- Send Discord response JSON using UTF8.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion PoshBot/Implementations/Discord/DiscordBackend.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ class DiscordBackend : Backend {
# Rate limiting logic inspired from Mark Kraus and PSRAW: https://github.com/markekraus/PSRAW/blob/staging/PSRAW/Public/API/Invoke-RedditRequest.ps1
hidden [object]_SendDiscordMsg([hashtable]$Params) {

if (-not $Params['ContentType']) {$Params['ContentType'] = 'application/json'}
if (-not $Params['ContentType']) {$Params['ContentType'] = 'application/json;charset=utf-8'}
$Params['Verbose'] = $false
$Params['UseBasicParsing'] = $true
$Params['Headers'] = $this._headers
Expand Down

0 comments on commit da076e7

Please sign in to comment.