forked from lug/matterbridge
Update slack vendor to master (#958)
This commit is contained in:
6
vendor/github.com/nlopes/slack/chat.go
generated
vendored
6
vendor/github.com/nlopes/slack/chat.go
generated
vendored
@@ -228,6 +228,7 @@ type sendConfig struct {
|
||||
endpoint string
|
||||
values url.Values
|
||||
attachments []Attachment
|
||||
blocks Blocks
|
||||
responseType string
|
||||
}
|
||||
|
||||
@@ -242,6 +243,7 @@ func (t sendConfig) BuildRequest(token, channelID string) (req *http.Request, _
|
||||
endpoint: t.endpoint,
|
||||
values: t.values,
|
||||
attachments: t.attachments,
|
||||
blocks: t.blocks,
|
||||
responseType: t.responseType,
|
||||
}.BuildRequest()
|
||||
default:
|
||||
@@ -265,6 +267,7 @@ type responseURLSender struct {
|
||||
endpoint string
|
||||
values url.Values
|
||||
attachments []Attachment
|
||||
blocks Blocks
|
||||
responseType string
|
||||
}
|
||||
|
||||
@@ -273,6 +276,7 @@ func (t responseURLSender) BuildRequest() (*http.Request, func(*chatResponseFull
|
||||
Text: t.values.Get("text"),
|
||||
Timestamp: t.values.Get("ts"),
|
||||
Attachments: t.attachments,
|
||||
Blocks: t.blocks,
|
||||
ResponseType: t.responseType,
|
||||
})
|
||||
return req, func(resp *chatResponseFull) responseParser {
|
||||
@@ -420,6 +424,8 @@ func MsgOptionBlocks(blocks ...Block) MsgOption {
|
||||
return nil
|
||||
}
|
||||
|
||||
config.blocks.BlockSet = append(config.blocks.BlockSet, blocks...)
|
||||
|
||||
blocks, err := json.Marshal(blocks)
|
||||
if err == nil {
|
||||
config.values.Set("blocks", string(blocks))
|
||||
|
||||
Reference in New Issue
Block a user