diff --git a/bot/bot.go b/bot/bot.go index 447529c..f08c894 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -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()