Skip to content

Commit

Permalink
Fixed the message send helper
Browse files Browse the repository at this point in the history
  • Loading branch information
robiball committed Oct 12, 2018
1 parent d690a8b commit b53017b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wrapper/slack.go
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

0 comments on commit b53017b

Please sign in to comment.