GH-12702 v2: Add new command response parameter: "skip_slack_p… (#13420)
Add new command response parameter: "skip_slack_parsing". Skips Slack magic if set to "true". (#12702)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
4314a0427f
Коммит
566f28be0a
@@ -434,16 +434,13 @@ func (a *App) HandleCommandResponsePost(command *model.Command, args *model.Comm
|
||||
post.AddProp("from_webhook", "true")
|
||||
}
|
||||
|
||||
// Do not process text if this is a code block
|
||||
skipSlackParsing := command.Trigger == "code"
|
||||
|
||||
// Process Slack text replacements
|
||||
if !skipSlackParsing {
|
||||
// Process Slack text replacements if the response does not contain "skip_slack_parsing": true.
|
||||
if !response.SkipSlackParsing {
|
||||
response.Text = a.ProcessSlackText(response.Text)
|
||||
response.Attachments = a.ProcessSlackAttachments(response.Attachments)
|
||||
}
|
||||
|
||||
if _, err := a.CreateCommandPost(post, args.TeamId, response, skipSlackParsing); err != nil {
|
||||
if _, err := a.CreateCommandPost(post, args.TeamId, response, response.SkipSlackParsing); err != nil {
|
||||
return post, err
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user