next #2

Manually merged
sneak merged 4 commits from next into master 2020-09-09 04:03:00 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit cb1bdab0af - Show all commits

View File

@ -1,6 +1,6 @@
package bot
//import "github.com/kr/pretty"
import "github.com/kr/pretty"
import (
"fmt"
"github.com/mattermost/mattermost-server/v5/model"
@ -247,7 +247,6 @@ func (b *Bot) HandleMsgFromChannel(event *model.WebSocketEvent) {
return
}
//pretty.Print(post)
if matched, _ := regexp.MatchString(`(?:^|\W)metar(?:$|\W)`, post.Message); matched {
b.HandleWeatherRequest(post.ChannelId, post.Id, post.Message)
return
@ -288,6 +287,7 @@ func (b *Bot) HandleMsgFromDebuggingChannel(event *model.WebSocketEvent) {
// FIXME check and see if the message from mm is a bot message, if so,
// ignore it
pretty.Print(post)
if matched, _ := regexp.MatchString(`(?:^|\W)shutdown(?:$|\W)`, post.Message); matched {
b.Shutdown()