Skip to content

Send-SlackMessage does not specify ContentType. #85

@gilmarwsr

Description

@gilmarwsr

Test Case

Send a simple message:
$web_hook_addr = "//hooks.slack.com/services/{...}"
Send-SlackMessage -Uri $web_hook_addr -Text 'Atenção'

Expected Behavior

incoming-webhook APP [1:28 PM]
Atenção

Current Behavior

incoming-webhook APP [1:28 PM]
AtenBAD+7BAD+3o

Possible Solution

Create a new parameter ContentType in the file SendSlackMessage.ps1 with default value "text/plain; charset=utf-8".

Use the new contentType parameter:
Invoke-RestMethod @ProxyParam -Method Post -Body $json -Uri $Uri -ContentType $ContentType

Context

I´m use this excelent powershell module to send some backend events to a multi-language team, i have some issues with messages were written in portuguese.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions