Skip to content

Commit

Permalink
Merge pull request #11 from m-mattia-m/develop
Browse files Browse the repository at this point in the history
fix flow-request-validation and specify slack integration in docs
  • Loading branch information
m-mattia-m authored Nov 23, 2023
2 parents 2bd64b5 + 1ddc679 commit 2f9a996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docs/content/docs/configuration/providers/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ Go to your [Slack integrations](https://api.slack.com/apps).
Create a Slack integration. After the creation go to ***Features > OAuth & Permissions*** and then
***Scopes > Bot Token Scopes***. Here you need to add this permission: `chat:write` to send
messages. You can also add `channels:join`, so that your integration can join public channels independently (optional).
Go in this page to ***OAuth Tokens for Your Workspace > Bot User OAuth Token*** and copy this token. This token should
have this format: `xoxb-123456abcdef...` You can also add in ***Settings > Basic Information > Display Information*** a
bot image, description, background color and the shown name (not functional, only for design).
Go in this page to ***OAuth Tokens for Your Workspace > Bot User OAuth Token*** click "install to Workspace" and copy
this token. This token should have this format: `xoxb-123456abcdef...` You can also add in
***Settings > Basic Information > Display Information*** a bot image, description, background color and the shown name (
not functional, only for design).

### Step 4

Expand Down
2 changes: 1 addition & 1 deletion internal/service/domain_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func validateFlowRequest(flowRequest model.FlowRequest) error {
if flowRequest.Target == "" {
return fmt.Errorf("name is a required attribute")
}
if flowRequest.MessageTemplateType == "text/plain" || flowRequest.MessageTemplateType == "text/html" {
if flowRequest.MessageTemplateType != "text/plain" && flowRequest.MessageTemplateType != "text/html" {
return fmt.Errorf("message-template-type is a required attribute; only 'text/plain' or 'text/html' are valid")
}

Expand Down

0 comments on commit 2f9a996

Please sign in to comment.