use 'as_user' when sending messages and replies

This commit is contained in:
skkiesel 2017-11-03 14:07:30 -04:00
parent 1ac566c2c2
commit 345129264b
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,7 @@ func (s *Slack) SendMessageType(channel, message string, meMessage bool) (string
url.Values{"token": {s.config.Slack.Token}, url.Values{"token": {s.config.Slack.Token},
"channel": {channel}, "channel": {channel},
"text": {message}, "text": {message},
"as_user": {"true"},
}) })
if err != nil { if err != nil {
@ -258,6 +259,7 @@ func (s *Slack) ReplyToMessageIdentifier(channel, message, identifier string) (s
url.Values{"token": {s.config.Slack.Token}, url.Values{"token": {s.config.Slack.Token},
"channel": {channel}, "channel": {channel},
"text": {message}, "text": {message},
"as_user": {"true"},
"thread_ts": {identifier}, "thread_ts": {identifier},
}) })