From 390ddd8c62f22137930a8f3dad2d23b27556226b Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 8 Sep 2020 21:06:43 -0700 Subject: [PATCH] ignore messages with null message body string --- bot/bot.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/bot.go b/bot/bot.go index f08c894..957e69d 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -285,9 +285,10 @@ func (b *Bot) HandleMsgFromDebuggingChannel(event *model.WebSocketEvent) { return } - // FIXME check and see if the message from mm is a bot message, if so, - // ignore it - pretty.Print(post) + if post.Message == "" { + // null message, we can probably ignore it. + return + } if matched, _ := regexp.MatchString(`(?:^|\W)shutdown(?:$|\W)`, post.Message); matched { b.Shutdown()