Update dependencies (#2180)
* Update dependencies * Fix whatsmeow API changes
This commit is contained in:
5
vendor/github.com/slack-go/slack/webhooks.go
generated
vendored
5
vendor/github.com/slack-go/slack/webhooks.go
generated
vendored
@@ -6,7 +6,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -24,6 +23,8 @@ type WebhookMessage struct {
|
||||
ReplaceOriginal bool `json:"replace_original"`
|
||||
DeleteOriginal bool `json:"delete_original"`
|
||||
ReplyBroadcast bool `json:"reply_broadcast,omitempty"`
|
||||
UnfurlLinks bool `json:"unfurl_links,omitempty"`
|
||||
UnfurlMedia bool `json:"unfurl_media,omitempty"`
|
||||
}
|
||||
|
||||
func PostWebhook(url string, msg *WebhookMessage) error {
|
||||
@@ -55,7 +56,7 @@ func PostWebhookCustomHTTPContext(ctx context.Context, url string, httpClient *h
|
||||
return fmt.Errorf("failed to post webhook: %w", err)
|
||||
}
|
||||
defer func() {
|
||||
io.Copy(ioutil.Discard, resp.Body)
|
||||
io.Copy(io.Discard, resp.Body)
|
||||
resp.Body.Close()
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user