You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@atartareanu I was looking for this as well. Would you be able to submit a PR request since you have the code already figured out? CC @RamblingCookieMonster
send-slackfile and send-slackmessage should support threads
send-slackfile should be modified as follows:
...
...
process
{
if ($Content) {
$body = @{}
switch ($psboundparameters.keys) {
'Content' {$body.content = $content}
'Channel' {$body.channels = $Channel -join ", " }
'thread_ts' {$body.thread_ts = $thread_ts}
'FileName' {$body.filename = $FileName}
'Title' {$body.Title = $Title}
'Comment' {$body.initial_comment = $Comment}
'FileType' {$body.filetype = $FileType}
}
...
switch ($psboundparameters.keys) {
'Channel' {$bodyLines +=
("--$boundary$LF" +
"Content-Disposition: form-data; name=
"channels
"$LF" +"Content-Type: multipart/form-data$LF$LF" +
($Channel -join ", ") + $LF)}
send-slackmessage
...
$Username,
...
if($PSCmdlet.ParameterSetName -eq 'Param')
{
$body = @{ }
....
The text was updated successfully, but these errors were encountered: