Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flow-request-validation and specify slack integration in docs #11

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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