Skip to content

Commit

Permalink
fix(slack): add instillSecret: true to token field (#126)
Browse files Browse the repository at this point in the history
Because

- We want the token is secret.

This commit

- make the token secret
  • Loading branch information
chuang8511 committed May 14, 2024
1 parent 47bc192 commit 7751585
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/connector/slack/v0/config/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
"instillAcceptFormats": [
"string"
],
"instillCredentialField": false,
"instillSecret": true,
"instillUIOrder": 0,
"title": "token",
"type": "string"
}
},
"required": [],
"required": ["token"],
"instillEditOnNodeFields": ["token"],
"title": "Slack Connection",
"type": "object"
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/connector/slack/v0/taskFunctions.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (e *execution) readMessage(in *structpb.Struct) (*structpb.Struct, error) {
}
wg.Wait()

if readTaskResp.Conversations == nil {
readTaskResp.Conversations = []Conversation{}
}

out, err := base.ConvertToStructpb(readTaskResp)
if err != nil {
return nil, err
Expand Down

0 comments on commit 7751585

Please sign in to comment.