From c0b19e939562caf5d0cb55996b37d78c65decc46 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 12 Feb 2019 19:08:24 +0100 Subject: [PATCH] update slack lib --- extras/util/slack.go | 2 +- go.mod | 3 ++- go.sum | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extras/util/slack.go b/extras/util/slack.go index cb75d74..5c8ab08 100644 --- a/extras/util/slack.go +++ b/extras/util/slack.go @@ -65,7 +65,7 @@ func sendToSlack(channel, username, message string) error { err = errors.Err("no slack token provided") } else { log.Debugln("slack: " + channel + ": " + message) - _, _, err = slackApi.PostMessage(channel, message, slack.PostMessageParameters{Username: username}) + _, _, err = slackApi.PostMessage(channel, slack.MsgOptionText(message, false), slack.MsgOptionUsername(username)) } if err != nil { diff --git a/go.mod b/go.mod index 0b54842..3bd43c6 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,9 @@ require ( github.com/lusis/slack-test v0.0.0-20180109053238-3c758769bfa6 // indirect github.com/lyoshenka/bencode v0.0.0-20180323155644-b7abd7672df5 github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 - github.com/nlopes/slack v0.2.0 + github.com/nlopes/slack v0.5.0 github.com/onsi/gomega v1.4.3 // indirect + github.com/pkg/errors v0.8.1 // indirect github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561 github.com/sergi/go-diff v1.0.0 github.com/shopspring/decimal v0.0.0-20180607144847-19e3cb6c2930 diff --git a/go.sum b/go.sum index 614ff63..caadfb4 100644 --- a/go.sum +++ b/go.sum @@ -58,10 +58,14 @@ github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675 h1:/rdJjIiK github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/nlopes/slack v0.2.0 h1:ygNVH3HWrOPFbzFoAmRKPcMcmYMmsLf+vPV9DhJdqJI= github.com/nlopes/slack v0.2.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= +github.com/nlopes/slack v0.5.0 h1:NbIae8Kd0NpqaEI3iUrsuS0KbcEDhzhc939jLW5fNm0= +github.com/nlopes/slack v0.5.0/go.mod h1:jVI4BBK3lSktibKahxBF74txcK2vyvkza1z/+rRnVAM= github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sebdah/goldie v0.0.0-20180424091453-8784dd1ab561 h1:IY+sDBJR/wRtsxq+626xJnt4Tw7/ROA9cDIR8MMhWyg=