From b7232eb47d868c012320b679f9bb1eeff2654bb1 Mon Sep 17 00:00:00 2001 From: Rob Iball Date: Fri, 12 Oct 2018 13:53:20 +0100 Subject: [PATCH] Fixed the message send helper --- wrapper/slack.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wrapper/slack.go b/wrapper/slack.go index dc1d965..5f90d60 100644 --- a/wrapper/slack.go +++ b/wrapper/slack.go @@ -5,6 +5,7 @@ import ( "github.com/nlopes/slack" "fmt" + slack2 "github.com/essentialkaos/slack" ) // SlackWrapper is a interface for Slack to enable test double injection @@ -49,6 +50,6 @@ func (s *Slack) OpenDialog(triggerID string, dialog slack.Dialog) error { // SendMessage posts a message to Slack that is visible to everyone in the channel func (s *Slack) SendMessage(message, channel string) { - msg := s.Bot.RTM.NewOutgoingMessage(message, fmt.Sprintf("#%s", channel)) - s.Bot.RTM.SendMessage(msg) + p := slack2.PostMessageParameters{} + s.Bot.Client.PostMessage(fmt.Sprintf("#%s", channel), message, p) }