moving to bot messages

pull/99/head
Karolis Rusenas 2017-08-28 20:55:49 +01:00
parent fb29f8d701
commit 8bd9e20f2c
1 changed files with 5 additions and 6 deletions

View File

@ -236,17 +236,16 @@ func (b *Bot) handleMessage(event *slack.MessageEvent) {
eventText := strings.Trim(strings.ToLower(event.Text), " \n\r")
approval, ok := b.isApproval(event, eventText)
if ok {
b.approvalsRespCh <- approval
return
}
if !b.isBotMessage(event, eventText) {
return
}
eventText = b.trimBot(eventText)
approval, ok := b.isApproval(event, eventText)
if ok {
b.approvalsRespCh <- approval
return
}
// Responses that are just a canned string response
if responseLines, ok := botEventTextToResponse[eventText]; ok {