From 5a2610991cb86c7a88d8632f152c41174d784f8d Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Sat, 20 Oct 2018 17:49:12 +0800 Subject: [PATCH] Updated to accomodate breaking changes in slack pkg. --- bridge/slack/slack.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 6524f974..c8254225 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -208,7 +208,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) { // Edit message if we have an ID if msg.ID != "" { ts := strings.Fields(msg.ID) - _, _, _, err = b.sc.UpdateMessage(channelInfo.ID, ts[1], msg.Text) + _, _, _, err = b.sc.UpdateMessage(channelInfo.ID, ts[1], slack.MsgOptionText(msg.Text, false)) if err != nil { return msg.ID, err } @@ -240,7 +240,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) { // Upload a file if it exists if msg.Extra != nil { for _, rmsg := range helper.HandleExtra(&msg, b.General) { - _, _, err = b.sc.PostMessage(channelInfo.ID, rmsg.Username+rmsg.Text, np) + _, _, err = b.sc.PostMessage(channelInfo.ID, slack.MsgOptionText(rmsg.Username+rmsg.Text, false), slack.MsgOptionAttachments(np.Attachments...)) if err != nil { b.Log.Error(err) } @@ -250,7 +250,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) { } // Post normal message - _, id, err := b.sc.PostMessage(channelInfo.ID, msg.Text, np) + _, id, err := b.sc.PostMessage(channelInfo.ID, slack.MsgOptionText(msg.Text, false), slack.MsgOptionAttachments(np.Attachments...)) if err != nil { return "", err }